Archives For author

For those of your not familiar with the concept, Elance requires contractors – people who want to work, and who bid on projects – to use connects when doing so. Basically, each bid requires a connect. When you’re out of connects, there’s no work for you.

Sure enough, it didn’t take them long to realize this in an opportunity to make additional money (or was it like this since the beginning?). Meaning, when you’re a non-paying member you have 10 connects per month, when you go step up and pay $10 a month, you get 20 connects, and so on. Of course, you can always purchase additional connects! 🙂 These numbers are not exact though, since I’m too lazy to look them up, but you get the drift.

Other features follow the same idea, too. You can bid on projects from a certain category by default, let’s say Programming, but if you want to bid on projects from another category too, let’s say Design – yeah, you’ve guessed it – additional $5 per month.

And there’s nothing we can do about that; their site, their rules.

However, we can make an impact on people looking for contractors, wanting to have the job done; they’re called clients on Elance.

Yeah clients, this huge intro was made just so I can say something to you. Since contractors are literally spending money to connect with you, make your project descriptions at least decent. You can’t expect contractors to spend money to ask additional questions about your project only to find out it’s not for them! Write a decent project description, and make life easier for both parties.

You’ll have better proposals, I guarantee it!

This plugin allows you to use Facebook comments on your site,  allowing your users to post comments to your articles, pages and so on. And it’s really great and not hard to set up, but it has something called grammar filter, a stupid, stupid feature.

What does the grammar filter do?

  • Adds punctuation (e.g. periods at the end of sentences)
  • Trims extra whitespace
  • Expands slang words (e.g. plz becomes please)
  • Adds a space after punctuation (e.g. Hi,Cat would become Hi, Cat)

First, it’s enabled by default. It’s even enabled by default if your page is not in English. So, you get into really weird situations where the filter corrects a proper word from some other language (for instance ‘da’, which in Croatians means ‘yes’), thinking it’s a slang word for the ‘yes’ in English. Second, how can you think about expanding slang words in today’s society, and on the Internet, when you know that, what, every second work is shortened in some way?

But that doesn’t even matter all that much, since this obviously can be turned off. Let’s see Facebook’s instructions on how to do that:

  • You can enable the grammar filter from the settings section of the plugin (hah, it’s enabled by default)

Well, that doesn’t help much. I know you’re asking yourself where the hell is that settings section. I managed to find it only when I started to actually use the plugin. Basically, on the upper-right corner of the comment box, you will see a ‘settings’ actions, and everything else is self-explanatory from there. Have a look at the images.

If you find these settings accessible from somewhere else, I’d appreciate if you’d let me know.

If you’re maintaining a WordPress installation with loads of images, disk space and bandwidth are probably a big issue. If they’re not, they will be soon. And if that site is hosted on a shared account, your hosting company probably already proved to you that something called “unlimited” does not exist.

OK, now when we know that, what can we do?

  • We have to start (if we’re not already doing) optimizing our images,
  • We have to optimize our existing collection, the best we can,
  • We have to think about getting a better host, or offloading images off our existing host.

Obviously, we won’t upload huge images, but even our optimized JPEGs or PNGs can be optimized even further. Meet Yahoo’s excellent Exceptional Performance series that recommends several ways to optimize your images in a lossless way. What’s even more better, there’s already a plugin called WP Smush.it that brings this functionality to WordPress, so we can use it easily. It automatically optimizes your images on upload, and it offers a bulk optimization feature for all the images that are already there. The feature is still experimental, and using it on a large amount of images proves to be a problem. More about this later on.

Better host is a hard thing to define. No shared host will offer you a truly “unlimited” option, so you can forget about that. They will offer to charge the extra bandwidth on a monthly basis though, but you have to decide if this is the best option. Getting dedicated servers is probably not an option, for obvious $$$ reasons. What I find a good option is to offload images to a CDN (Content Delivery Network) network. Amazon Simple Storage Service (S3) first come to mind, and in my calculations, this option proves to be x2 cheaper then paying for additional bandwidth.

WP Smush.it

The plugin is great, make no mistake about that. However, the problem is the bulk feature, that appears to be a memory hog. Basically, on one of my installations that had around 6k images, using it was not possible, since I would always get “out of memory” errors. Since I’m on a shared host, allocating more memory is not an option. Luckily, there are two ways around this:

  • Use AJAX Thumbnail Rebuild plugin along with WP Smush.it. AJAX Thumbnail Rebuild plugin uses AJAX to rebuild one image at a time, and since WP Smush.it is already active, it optimizes each one.
  • Hack a bit into the WP Smush.it code, and limit it to a certain number of images, for example, 500 (thus avoiding the “out of memory” error). Then run the bulk feature enough times to cover all your images.

First of all, why are you using GoDaddy? I mean, seriously. Cancel that plan. Quit. Go somewhere else. Anywhere. Second of all, if your client is using GoDaddy, educate him, talk him into canceling that plan. Only if your client is stubborn, like mine, then read the rest of the article.

Basically, you do all the standard tasks you need to do to bring a fresh WP installation online, and after configuring wp-config.php file, you find yourself staring at blank page. If you plan contacting GoDaddy support – good luck with that.

Rather go through this list:

  • delete all the empty spaces and lines after the last meaningful line in your wp-config.php file
  • disable FastCGIread about how to do it here
  • if you’re getting the “Strict Standards: Assigning the return value of new by reference is deprecated in /…/…/public_html/wp-settings.php” error, you’re probably trying to install an older WP version; if you don’t really depend on it, get the latest version

And remember, leaving localhost in your wp-config.php file won’t cut it with GoDaddy, you need to change it to a value that’s specific to your account.

If you’re not able to make it work even after all these steps, quit GoDaddy.

This has to be one of the most frustrating problems I’ve ever seen.

Basically, I have started with a fresh installation of Eclipse, Android SDK, ADT plugin and so on, and with the Hello World app, in order to setup a working environment. I don’t really understand why, but I have encountered a problem where the emulator simply does not want to load the app. Loading the app on an actual device hooked up with USB works fine, only the emulator causes problems.

There are a lot of suggestions out there, but none of them helped me:

  • Run emulator from Start menu (and not from Eclipse), and then Run your app
  • Turn off UAC
  • Be patient because emulator knows to start up really slow, and use the Snapshot feature

The workaround that works for me is this one (stackoverflow.com question answered). Let’s repeat what’s been said there in my own words.

When you have your app ready, and you want to run it in emulator, you go to ‘Run->Run’, and you see emulator loading. When it loads, it loads locked, and after unlocking it does not show your app. The log is clean, and shows no errors.

Now, open up your Task Manager, and end the ‘adb.exe’ (Android Debug Bridge) process.

The next step is to start your app (Run->Run) again, without closing the already running emulator. Now, depending on whether you chose the AVD to run manually or automatically (I use the manually option), you should get a screen asking you whether to use the already running emulator, or to start a new one. Use the already running one, and now your app should load just fine.

And that should be it.

Hopefully this helped you, and hopefully it will help me in the future when setting up a fresh environment.

If you ended up here in your search, you’re probably not able to select years above ’2013′ (or something similar) in the date picker. Why is this set to this value by default is beyond me, but since you’ll learn how to change it now – who cares!

Basically, what you need to do is to edit the faces-config-custom.xml (this actually overrides the faces-config-beans.xml one) file. If you’re too lazy to look it up right away, the part we’re interested in looks something like this:

<managed-bean>
<managed-bean-name>DatePickerGenerator</managed-bean-name>
...
<managed-property>
<property-name>startYear</property-name>
<value>2020</value>
</managed-property>
<managed-property>
<property-name>yearCount</property-name>
<value>20</value>
</managed-property>
</managed-bean>

This will show years from ’2020′ to ’2000′, so you can see that the count goes downwards, from the start year.

There’s some additional information and best practice advices here.

This problem can be a bit annoying if you’re used to using the scheduled posts feature. But, like with any problem, there is solution, this time a quick and painless one.


Twitter Tools offers the possibility of setting up a default hashtag for your Tweets. Since this feature won’t work with the scheduled post, I took the liberty of seeing how this actually works – and to our luck – it uses custom fields. To be more precise, aktt_hash_meta custom field.
Therefore, when writing a scheduled post, simply add this custom field, and set it’s value to the hashtag you want to use, for example #ivanlistes. Save the post with this custom field added, schedule it, and that’s all there is to it.

It does require a bit more of work, but this way we don’t touch plugin’s original files, and we’re absolutely sure we won’t break something, cause future compatibility issues and so on.

There are loads of these scripts out there, and we’re talking about this one.

Basically, what happens after user submits a new status, like, or whatever you want to call it, he or she sees a new blank page with ‘Success! Go here to see your submission’ message. Supposedly, this is a fail-back option if something else doesn’t work (broken .htaccess file for example). Since their forum is less then helpful, and I had no time troubleshooting why this does not work, I ‘fixed’ it by adding a PHP redirect to submit.php file.

If you want to try this solution out, you should open submit.php (found in the root) and edit the code like this, starting at row #41:

if($approve_stories == "1")
{
$location = $config[baseurl];
header('Location:' .$location);
}
else
{
$location = $config[baseurl]."/like/".$pid;
header('Location:' .$location);
}

This should result in user being redirected to the newly submitted status.

What do these things have in common? They use JavaScript libraries to work, and if those get messed up, they will stop to function. This happened to me after switching hosts. Since I didn’t have the time to debug this, and search for a proper solution, I simply used this plugin. So, what does it do? Here comes the answer:

Allows your site to use common javascript libraries from Google’s AJAX Libraries CDN, rather than from WordPress’s own copies.

This will prove to be a fast solution for your problems. The plugin is useful even if you don’t have these problems, since it:

  • increases the chance that a user already has these files cached
  • takes load off your server
  • uses compressed versions of the libraries (where available)
  • Google’s servers are set up to negotiate HTTP compression with the requesting browser

Oracle Certified Java Associate is the entry level certification; it’s not even a prerequisite for OCJP. It’s supposed to be a test of you basic knowledge of Java, and while learning for this certification, you should be brought into the world of Java. It should teach you about:

  • Fundamental Object – Oriented Concepts
  • UML Representation of Object-Oriented Concepts
  • Java Implementation of Object-Oriented Concepts
  • Algorithm Design and Implementation
  • Java Development Fundamentals
  • Java Platforms and Integration Technologies
  • Client Technologies
  • Server Technologies

Your test will be divided into these categories as well, and when graded at the end of the test, you will get you complete score, plus your score in each of these categories.

If you want to pass the test, I suggest reading the OCJA book. If you understand what’s in it, you will understand and pass the test, too. If you’re a somewhat experienced Java programmer/developer, you should still check the book out – at least the parts that are the most theoretical ones. You will get pretty detailed questions about technologies; for example; differences between servlets and applets, differences between Swing and AWT, differences between J2ME, J2SE, J2EE and so on.

To get the feel of how the test will look like, and how the question are being asked, check any of the following links:

All of the questions listed on these sites look exactly like the ones in the actual test. If you’re looking to spend some money as well, WhizLabs.com software is a great help, and has quite a few mock tests, quizzes, questions and so on.