Blog of Leonid Mamchenkov

You just stepped in a pile of posts.

Entries Tagged as 'languages'

Programming language barrier

Posted in All, Programming on June 7th, 2008 · 5 Comments

One of the frequent things that I hear about programmers is that it doesn’t matter which language the person is using and which language you need him to use, because if he is any good he’ll learn and catch up pretty fast.  In other words, if you take a decent Java programmer and push him to write PHP code for you, you’ll only have issues for a few days.  Or weeks, at most.

I understand the reasons for this statement, but I don’t agree with it.  At least not completely.

Firstly, the reasons.  They are rather obvoius, but I’d rather stagte them anyway.  Computer Science is not specific to any programming language.  The concepts and approaches are more or less the same everywhere.  Flow control, data structures, and algorithms are not language specific.  Each language has its own best practices and recommended variations, but a bubble sort in PHP will be very similar to bubble sort in Java.   Then you need some common sense, which is also not laguage bound at all.

Secondly, the disagreement.  I think that the Computer Science theory and common sense aren’t the only things that make up a programmer.  What makes a lot of difference is experience.  Programming languages, in their practical applicatoin, are just collections of software - compilers, linkers, debuggers, libraries, IDEs, etc.  Like any other software, programming language software has bugs, undocumented features, and Days When Things Don’t Just Work.  It’s the experience with the language that teaches the programmer how to handle the issues of each software piece.  And that experience is priceless (almost).

Even if you’d manage to push a Java programmer into writing PHP code, that would a waste of resources.  A Java programmer is a Java programmer, not PHP programmer.  He will, of course, learn PHP nuances with time, but, he’ll probably lose a part of his priceless (almost) bagage.  Sounds a lot like misuse of resources.

Another part of my disagreement is not so much reasoned as emotionalized.  I’ve seen a few C and Java developers switch to Perl and PHP for their new positions.  Not that I was forcing them to or anything, but they did.  And the switch was moslty painful to say the least.  Here are some of the areas that I noticed as being hard to comprehend.

Compiling vs. interpreting. Those people who were used to their compilation process were missing something for the first few days.  Some needed as much as a week to adopt, even though write-save-reload browser was done a few hundred times a day.

Debugging. There are two major camps here.  In the first one are all those people who live in the debugger.  They know all the keyboard shortcuts and they have their highlighting customized.  In another camp are people of the simpler nature, those who use print() and die() for most of their debugging needs.  It seems that most people coming from C and Java prefer the debugger way.  Most of the interpretted languages do have either a standalone debugger or a built in debugging tool, but it seems that the majority of interpretted language crowd use the print() and die() approach.

Sigils. If you don’t know what a sigil is, read this Wikipedia page.  Because you do know what it is.  Many strong type language don’t use any sigils.  Most of the loosely typed languages do.  Furthermore, when both the language from which you are changing and the language to which you are changing use sigils, chances are there will still be a difference.  PHP, for example, uses $ for both scalars and arrays.  In Perl though, you’ll get a $ for scalar, @ for array, and % for hash.  Perl’s sigils are extremely helpful when figuring out someone else’s code. I remember the pain of having just a $ in PHP, when I was learning it.  And I can’t even imagine how confusing it is for people who are used to non-sigilized programming languages.

Types. As already mentioned above, strong typed language programmers can be often confused with the fact that variables can change their type on the fly, and that they don’t even need to be declared before use.  Loosely typed language programmers will often complain about the requirement to define their types.  Three of the most common questions that I’ve heard regarding this matter were:

  • “How do I define an array of elements of a certain type of a certain length?”
  • “Is this line a piece of non-sense or does it really do something:   $sum += 0; ?”
  • “What’s wrong with writing:  int amount; amount = 2.5; ?”

There are, of course, more areas than just those - include pathes, include files, OOP, database abstraction, loops (”What the heck is foreach?”), memory management, libraries, and so on and so forth.

Even the list of the resources for each programming language takes time to build.   Yes, time.  And time is one thing that’s always against us.  Everything else we ca handle.

→ 5 CommentsTags: , , ,

More on PHP

Posted in All, Programming on May 21st, 2008 · 7 Comments

I’ve recently posted some of my thoughts on PHP.  If you enjoy the topic, here is an excellent post over at Coding Horror, which reminds why PHP sucks so badly and also why it will stick around for some time to come.

→ 7 CommentsTags: , ,

PHP 6 - hopefully not the end of the road

Posted in All, Programming on May 19th, 2008 · 1 Comment

I’ve heard plenty of positive buzz about PHP 6 in the last few weeks.  Yes, it’s coming out.  Yes, it brings quite a few improvements, including better Unicode support, better security, and more help for larger projects through namespaces.  However, I hope that it won’t be the last PHP release, since there are so many other things that need fixing.

Here is a good overview, as compared to the best programming language ever - Perl.  But this probably reminds you of a famous Euro-English joke, no?   But I do miss sigils and proper hashes.  I’d love to see better memory management when programming objects.  I’d love to see improved database interfaces with prepared statements and database abstraction layer.  I would really welcome a cleanup in function names and return values. I … I … I … I hope that PHP 6 is not the end of the road, and that PHP 7, PHP 8, and PHP 9 will follow.

→ 1 CommentTags: , ,

Hope to see more language controls in Google Reader

Posted in All, Technology on April 11th, 2008 · No Comments

If you read this blog even for a short while, you probably know that I depend on many Google tools, such Gmail and Google Reader. As a power user, I believe I know pretty much everything these services have to offer. I also know a few things that these services don’t have on offer yet, but which I’d gladly welcomed.

I already mentioned a sharing of interesting items in Google Reader with your contacts. That’s a really nice feature. And you can even control which users you see shared items from. However, one important thing is missing in that functionality - language control.

You see, I don’t have that many friends who are using Google Reader and share items, but even those few that I have speak a total of 7 languages (Russian, English, Greek, French, Ukrainian, Dutch, and German). Not only they speak this languages, but they also share a lot of items in those languages. That is sort of useless, since I only know two languages - Russian and English. These two are enough to provide the common ground for communications with all of my friends.

So, what I would really like to see in Google Reader, is a new setting which would let me filter my friends’ shared items to only those languages that I can understand. I know this can be a bit tricky to implement (how does the system know in which language the shared item is? or, even, what should it do if shared item is in more than one language?), but it would be really helpful functionality. And a huge time saver too, since then I wouldn’t have to go through all those items that I have no understanding off and marking them as read.

Should such a feature appear, I’d like to see it taken to extreme. I should be able to automatically tag or do searches on content in specific language. This will give me a useful tool of comparing hype about the same topic in different language communities.

→ No CommentsTags: , , , , , , ,

Perl Monks level bumped

Posted in All on September 15th, 2005 · 2 Comments

It’s been a while since I hanged out at Perl Monks. Today I followed some link and ended up reading a couple of articles there. I decided to check my status and discovered that I only needed 9 points to achieve the next level - pontiff. 30 daily votes were available, so I voted here and there and gained the points.

Now I am a Pontiff and need 700 points to step up to the top of the ladder - Saint.

→ 2 CommentsTags: , , , , ,

Advertisement

  • 50 ways to help the planet
  • Flickr
  • Advertise at mamchenkov.net