Archive for Programming

jQuery Plugin Development Tips

Make Sure Your Plugin Naming is Unique - All naming conventions in your plugin, including it’s name, class and id’s should be as unique as possible to avoid conflicts with other CSS and JavaScript code and more important other jQuery functions.

Keep Your Code Separated - Avoid as much as possible mixing your CSS and JavaScript code. You never know what a developer may want to modify, so it’s best to keep these things in their respective files.

Please NO Hard Coding - This is the most frustrating thing to come across in any plugin you use. A hard coded file path in the JavaScript code that assumes you will be using the root path or something. Image paths can all be set in the CSS using background images, and paths in the code should all be written relative to begin with.

Your jQuery Plugin Should Work Out of the Box - Anytime a developer uses your plugins there should always be at least a default mode that just works out of the box. When they call your plugin something should happen, if you don’t at least have this, chances are people will pass on your plugin and keep looking for others. This makes it really easy for the developers and now allows them to tweak options as necessary.

Provide Plugin Options - This follows from the point above, once your plugin is working any modifications to it should be provided through some options. Don’t ask developers to have to create some kind of structure with div’s. Although this rule case can be broken as in the case of a jQuery slideshow plugin where a user may want to specify multiple images, for the most part, keep this in code and set it as an option to toggle on or off.

Thoroughly Test Your Code in All Browsers - This step is easy to do and only takes a little extra time and effort. This is also probably the most important step which will make or break your plugin. In many cases a developer may not find a bug in your code but a user most definitely will sooner or later. If users are reporting bugs and it turns out to continuously be your jQuery plugin, there is a good chance it will get dropped and replaced. Make sure you run a quick test in all browsers and sort out any last minor issues before release.

Document Your Plugin Code - Before releasing your plugin make sure you document it. Your code makes sense to you because you just wrote it, but it may not make sense to others or even to yourself three months ahead of time.

Software Languages: Is Popularity Important?

Programming Language Popularity has long been a heated subject among developers. Just because a language is popular does not mean it is the best or the most suitable, but it does carry some message about why is should be used. Choosing a less popular language may carry dangers but it also may be loads more fun.

What do we mean by ‘popular’ anyway?

Sites like Tiobe and LangPop give lists of monthly analysis of programming language popularity. Their methods of assessment are well documented and they usually come down to an eclectic mix of analysis of mentions in job pages, search results, coding websites, book lists and other online utterances of the language name. Not strictly a pure statistical method but a practical solution to what is a difficult metric to measure. The lists often contain more than 100 languages and I’m not sure where all these fringe languages are used.

What do we mean by ‘Programming Language’?

There is also a need to define ‘programming language’ itself as I would split languages into at least two groups. I would class a primary languages as one that could create an entire application by itself, examples being C#, Java, PHP, C++.

Then there would be ‘support’ languages like JavaScript and SQL. There’s no doubt that these are languages in the stricter sense but I wouldn’t consider writing an entire app in them. But whether I used C#, Java or PHP to write a website, I’m pretty sure that I would be using JavaScript and SQL somewhere inside the app.

What do we mean by ‘Popularity’?

As mentioned above, various criteria is used to ascertain which language is most popular. But is that popular because it is commonly used or is it popular because programmers like it? And what context are we in? Are we taking about creating websites, or about creating web services or about creating Windows applications? The choice of ‘popular’ would vary between them. Yet choosing a language just because it is right for the application we are making could be a mistake in itself.

So is ‘Popular’ important?

If you’re involved as a professional in the software industry, Yes! There’s a number of reasons why.

As an owner or manager of a software company

It is much safer to use commonly used languages. You’ll find that is much easier to employ programmers, easier to replace a programmer, easier to get contract programmers, easier and cheaper to get COTS (Commercial Off The Shelf) software components and there will be more training and knowledge available.

Using less popular languages has risks. You may have an expert programmer now, but when they leave it makes replacement difficult. Also, the company may have to write nearly everything themselves, including complex drivers. And the customer may not get on-board with apps written in relatively unknown languages.

Some companies like to take the risk and go out on a limb; it may work for them. But when a company has built up years of software assets written in a given language (such as modules, classes, assemblies, programmer knowledge/experience and training resources) and it has invested heavily in the associated technologies (servers, platforms, databases) it is extremely difficult, risky and expensive to move track. That’s why the same few languages are always at the top of the popularity list.

As a developer

There will be more jobs available if you know the ‘popular’ languages. Java and C# programmers are in constant demand and probably be so for quite a time.

The main problem for developers is that they get bored and want to do something new. Many of the PHP developers I know would rather use Ruby to program their sites. But Ruby’s popularity is actually stagnating (even decreasing) as the opportunities are not available due the company owners fear of moving to a new technology.

So What Programming Language should I learn?

At the moment I recommend you learn one of the most popular: C#, Java or PHP. That will give you a good opportunity to get a job and these are well respected. You will need the support languages such as SQL, JavaScript, jQuery, XML, HTML, etc.

Don’t ignore learning a second language, something like Ruby, Python, Groovy, F#, Erlang, Scala, Haskell, etc. They’re interesting and you don’t know which will breakout for the lead in the next few years. Watch their relative movement in the popularity lists.

There’s also a financial consideration. In my recent experience of watching the UK contract job market, C# programming jobs pay (on average) 50% more on a daily rate than PHP.

Times Change

I started with C, onto C++, then Visual Basic became very popular until C# came out. I moved from Windows GUIs to Internet apps. C# is still my main language but I now find me doing quite a bit of PHP too.

In the early days, we had a decade of debates of which was better between Java and.NET until everyone realised there was never going to be one winner – they’re both great. Today the argument has moved more towards what’s the best PHP MVC framework.

We’re also in an era of hybrid systems. Thanks to web services the back-end can be one language and the front-end another; plus with MVC we’re using templating languages like Razor and Smarty. Combined with the power of modern platforms, the choice of language is maybe diminishing slowly and becoming more irrelevant.

Are BlackBerry Marketing Initiatives Heading for Profit or Loss?

When it comes to market share, RIM would certainly agree of the fallback they have faced in the last one year. What is still unclear is whether BlackBerry intentionally continued to remain what the market described as a stage of ‘stagnancy.’ While other mobile devices sales surged, RIM fell from a $78 billion dollar height in market to an exceedingly low $12 billion dollar mark.

Despite the severity of figures, the BlackBerry mobile still retained the top seventh position in the mobile market. Research analysts hold the view that following the introduction of BlackBerry, the niche market, majority of them being business executives, remained loyal. The question is whether RIM can afford to continue catering for a very select market. Given the popularity and competition from other mobile devices, it is highly unlikely. What is admirable is that they have continued to retain their identity rather than imitate the success. Again, this ‘lack of innovation’ has been viewed with criticism that RIM was afraid to fail, and perhaps the failure would be more obvious if they were to be compared with other similar advancement.

All or nothing

On the other hand, BlackBerry users have not complained. They are satisfied with the ‘push’ features of the Smartphone and praise it for its compatibility and fault-free services. It can be concluded that RIM has standards of perfection that have perhaps made them more unwilling to experiment.

The next few months look promising. BlackBerry 10 is being looked upon as the perfect business solution in mobile technology. Combining professionalism with entertainment, the OS 10 is expected to have all the merging capabilities with a smoother experience than any other mobile platform. Its apps are also expected to exceed all others in the market. Its open source technology will allow developers not to just focus on data, but design as well. The one drawback, although it us yet to be ascertained, is that it will not support Java applications and therefore the previous versions will not be compatible with BlackBerry OS 10.

Designer BlackBerry

As if to stress their exclusivity point further, BlackBerry recently partnered with Porsche to bring out the BlackBerry Porsche Design P’9981 Smartphone. The model is more exclusive than its other editions. Although reviewers have praised the exterior more with their typical QWERTY keyboard, it is the software features that are predicted will mark its future success, namely the ‘user friendly’ performance and useful apps such as the Wikitude World Browser app.

BlackBerry Mobile Fusion

Mobile management is a relatively broad term that BlackBerry has used by synchronizing mobile applications with the BlackBerry Playbook tablet and desktop features to a ‘single point of control,’ which is a combination of the BlackBerry Devices Services, the latest addition of the Universal Device Service and the studio app. Especially suited for the IT department of companies, the fusion is considered to be user-friendly within the business environment.

With all this and recent partnerships with tinyHippos, Jaycut and Paratek, it is still early and difficult to predict BlackBerry and RIM’s future in the market. Analysts believe it depends entirely on just how RIM will use their market strategies, that is, whether they will choose to continue holding the niche customers, or take on a more aggressive share of the market.