Win32 odyssey: who needs documentation?

by Salvatore Iovene on 14 February 2008 — Posted in Opinions

During my coding adventures, I have just found myself having to port an existing Win32 application to CMake. After writing a mere 283 lines CMakeLists.txt file, and getting the application successfully compile, I fired it up to see if it worked, of course. I found it failing when doing a WSAAsyncSelect, and failing there didn’t seem to make any sense. So, to get to the point, I decided I’d just carefully compare the compiler’s options generated from CMake with the ones that were in the original Visual Studio project file. After finding the difference, I decided I was gonna learn what those flags meant, so I googled for “visual c++ compiler flags” and guess what? Nothing useful. The right string to google would be “visual c++ compiler options”. But before getting to it, I had to unsuccessfully go thru “visual studio compiler options”. You’d think that would cut it, right? Since “visual c++ compiler options” did it. But, surpringly, “visual studio compiler flags” did actually find what I wanted. Interesting combination.

I don’t really feel like blaming Google on this. Reproducing the same search pattern in the internal Help function of Microsoft Visual Studio gave me the same success/no-success scheme. Besides, the whole point-and-click procedure is a terribly uncomfortable experience. Not only I have to get my hands off my keyboard (inherently a waste of time), but also do I have to (mind: have to) wander my mouse around for a while to get to the information.

So, I wondered, is there an alternative? I went to my rxvt terminal emulator (which I run through Cygwin, can’t really be bothered with using the native Windows Terminal), and tried to get some help from cl.exe. No luck. After some try-and-fail recursion, the least useless thing I would find was cl.exe -help which would give me 106 (one hundred and six!) lines of documentation. Wow, impressive, isn’t it? Comparing, gcc’s manual page is 7820 lines, as for the latest stable.


Get new articles via email

Related posts:

Leaving closed protocols behind

by Salvatore Iovene on 23 October 2007 — Posted in Personal, Opinions

(Leggi la versione Italiana qui.)

In order to fulfill what has been a proposition of mine for quite a long time, as of December the 1st 2007, I will no longer use any Instant Messaging services based on a closed protocol, e.g. MSN, ICQ, AIM or Yahoo. The only way you will be able to contact me (besides conventional methods such as phone and email) will be through my Jabber ID: salvatore.iovene at googlemail.com (replace “at” with “@”). This also works from GMail.

Reason

Proprietary IM systems have a terrible flaw: MSN users can’t chat with Yahoo users, AIM can’t chat with ICQ, and so on. So if I have friends who only use MSN and other friends who only use ICQ, I will have to use both to keep in touch with everybody. The reason for this is the corporate greed taking advantage of the network effect. Wikipedia says:

The network effect is a characteristic that causes a good or service to have a value to a potential customer dependent on the number of customers already owning that good or using that service.

This also reflects the fact that corporates are valuing their own profit better than the final user’s satisfaction. Moreover, I don’t like the idea of using a closed protocol. “Closed protocol” means that the data (e.g. chat messages) exchanged by two computers involved in a transaction, is represented with a secret format, that the user is not allowed to study. Jabber, on the other hand, uses an open protocol, based on XML. Everybody is allowed to study the protocol, and write clients or servers that support it. This allow collaboration and cooperation. Greedy corporates, instead, keep the protocol secret in order to be the only ones able to write a client and a server for it, so they impose you the use of their clients (such MSN) which might be bloated with spyware and advertisements.

Since I’ve decided that I don’t want to support this kind of behaviour, I will unsubscribe from the closed protocol services that I use. You don’t have to do the same, but just get yourself a Jabber account in order to keep in touch with me, and, preferrably, convince your friends to do the same.

What is Jabber?

When you hear someone (probably me) talking about Jabber, they are usually referring to one of the following:

  • The XMPP (Jabber) Protocol
  • The Public Federated Jabber Network (PFJN)
  • The Jabber Platform (which includes the previous items, as well as jabber chat clients, devices, transports, etc.)

Jabber is, strictly speaking, the informal name of an open-standard decentralized instant messaging protocol officially called XMPP.

NOTE: It is also the name of a company called Jabber Inc., which sells Jabber-based products. However, the Jabber platform is much larger than this single company. Don’t let this confuse you! If you want to go to the authoritative website about jabber, that would be jabber.org, not jabber.com!

The network of independent Jabber servers on the internet make up the Public Federated Jabber Network. If you have an account on a server on the PFJN, then you can communicate with anyone else who has an account on a PFJN server. This means that Google Talk users can communicate seamlessly with Gizmo-Project users (and vice-versa), as both of these services are on the Public Federated Jabber Network.

How can I use Jabber?

To use Jabber you need a Jabber client and an account on a server. Here’s a list of popular clients:

Then you will need an account. Most of the listed clients will allow you to create a Jabber account choosing from a list of servers, or, if you want, you can run your own server.

Google Talk

If you have a gMail account, then you have a jabber id via Google Talk! Your jabber id is the same as your email address. You can use either the native google talk client or any other jabber client.

Gizmo Project

Also, if you use the Gizmo Project, you too have a jabber account. Your jabber ID is login-name@chat.gizmoproject.com.

jabber.org

The Jabber Software Foundation is probably the best known Jabber server out there. They just recently switched over to ejabberd for their software, so they should be quite solid now.


Get new articles via email

Related posts:

Fujitsu-Siemens shame on you

by Salvatore Iovene on 17 October 2007 — Posted in Opinions

I found myself in the process of realizing a dual-boot system on a laptop, with Windows XP and Ubuntu 7.10. After wiping out the content of the disk and partitioning it appropriately, I proceed to the installation of Windows XP (knowing that I needed to install it first, since it would overwrite the MBR and completely disregard and disrespect user’s freedom), so I put in the so-called Recovery Disk provided with that particularly Fujitsu-Siemens laptop. After a little while, the Recovery Disk was proposing me to install Windows XP either using the full disk, or in two partitions, with a 10 GB “data” partition. I was astonished and outraged. It seems that the Fujitsu-Siemens people were thinking that the user wasn’t smart enough to be able to choose what partition use for his or her Windows install. They would rather limit the user’s freedom, and not give him or her some choice. I suspect this was the result of some pressure from the Microsoft end: this “trick” basically stops the user from installing other Operating Systems along Windows, unless he or she buys a new non-branded copy.

Fujitsu-Siemens and Microsoft: shame on you!


Get new articles via email

Related posts:

  • No related posts

Who wants to talk about patent infringement?

by Salvatore Iovene on 15 May 2007 — Posted in Opinions, Articles

After all the dust raised again by Microsoft about Linux and the Open Source community allegedly committing patent infringements (235 this time, they were 228 in 2004), I really feel the need to spend a few words about the matter, or then, a few images.

It looks like the jealous Redmond’s zealots, avidly fighting to protect the uniqueness of their work (sarcasm intended), didn’t realize that they have been playing copycat for a long time, reinventing the wheel and doing a bad job at it. Do the following screenshots tell you anything?

Search page

search.jpg

Search results

search2.jpg

Image search

images.jpg

News search

news.jpg

Maps search

maps.jpg


Get new articles via email

Related posts:

How to improve the quality of programmers

by Salvatore Iovene on 9 March 2007 — Posted in Opinions, Coding, Articles

After claiming that most programmers just can’t program, and actually addressing most of the problems to the lack of passion of people who decide to start a career as a programmer, I would also like to express my point of view on a tightly related subject: what can be done to improve the situation? The problem that I was trying to bring up in the spotlights, is that a lot of people just start (or wish to start) a career in the IT for no particular reasons. Those are the ones who don’t love and don’t loathe programming, and they just see it as something that pays their bills. Well, maybe the first question that I should address, actually is: why is this bad? Sure there are so many jobs which don’t require passion at all, and people just do them because a job is just a job, and don’t really care. In my opinion, being a programmer is different.

There are many people, especially the ones who sit high in the hierarchy of a company, who see programmers as the last and least important step of a ladder. They often think that programming is quite of an automated and repetitive task, and it could basically be done by anyone, with just a little training. Unsurprisingly, this seems to be the opinion of most common people, who ignore what programming really is. I wouldn’t want to discriminate among different types of programming, or different programming languages, but it’s obvious to me that programming, to some extent, actually can become an automated an repetitive task. That’s quite the minority of cases, though, so I will simply ignore them, and focus on the rest.

As anybody who’s a programmer knows, programming is a highly creative task, that requires good imagination and great problem solving skills. Everybody else might just see it as “typing stuff on a computer”, and believe me, there’s a whole lot of educated people who think that programming is a monkey matter. Hence the term “code monkey”. This term has historically been abused a lot, by even programmers themselves. A “code monkey” is said to perform a programming task so easy that even a monkey could do, as the image suggests. There are two truths about this phenomenon: first of all, luckily, programming requires far more skills than it’s usually believed; secondly, and sadly, the majority of people just ignore it.

The problem with lousy programmer is kind of similar to a medal: it’s double faced. You could actually call it a dog trying to bite its own tail: as programming is believed to be an easier and easier task, more programmers are needed; as more and more programmers are needed, more people will jump on the field; as more and more people try to become programmers, the lousier the average quality of programmers gets. Unfortunately, what average non-programming people miss to understand is that although it doesn’t really take a hard training to become a lousy programmer, it takes a damn hard one to excel in the art of programming. Moreover, most people just lack the innate logic mechanisms that make you a potential programmers. Such mechanisms are developed in your mind when you’re very young, and it’s quite rare to develop them after your twenty-somethings. With this, though, I’m not denying that there are a lot of people who actually do develop those mechanisms in advanced age. I’m just trying to think of the big numbers, here.

So, getting to the point, what went wrong and how can it be fixed? I don’t think it would be wise to say that what’s wrong is that there’s too much need of programmers, ergo the average quality was inevitably doomed to lower and lower over the time. I rather think that the problem is with education. Of course I can’t speak for all the universities and colleges in the world, but I can at least try and speak for the one I’ve known personally, or through people who have studied there. It seems that, as more and more people apply to Computer Science or related departments, the easier it gets to get in (sorry for the pun), and to get through with it, i.e. to graduate.

I know this happens most likely in any other faculties, but seeing that there are people who have been studying CS for three or more years, and still can’t get through the most simple concepts, just doesn’t seem right to me. Yesterday night, I was sitting in an IRC channel about the C programming language, when somebody joined in and asked:

“I just started studying structures in C, and I don’t get them. Can anyone explain to me what’s the use for them?”

Ok, I don’t really think there’s anything wrong in not getting the point of C structures right away, but after a little chatting, it turned out that the guy was in his second year of Computer Science, and this was the second time he took the C class. Still that wouldn’t be a reason of hatred, of course (not that I have any hatred), but after another small while it turned out that the guy didn’t like programming at all, but he just got himself into it because he applied to CS since he liked to “fiddle around with computers”.

What’s really needed, in my opinion, is a harder and less tolerant educational system, that would be more selective, rather than pushing everyone forward. People that find out to be really not made for it, should just give up and move their focus on something less.

I’m actually very well aware that a lot of programming work, nowadays, is not really rocket science, still this doesn’t mean that it should be done by completely unqualified people. If what Jeff Atwood says in his post about programmers who can’t program is true, and that is that 199 out of 200 applicants (not programmers, applicants) can’t write any code whatsoever, than it obviously means that something is wrong. Looking at the numbers provided by Joel Spolsky, it looks like a lot of these basically incompetent people are going to end up working on an actual programming job, and maybe their code will end up on The Daily WTF (Paula, are you there?).

Unfortunately, the education is not the only one to blame. No matter how much education will improve, there will always be unqualified people who are going to apply for jobs that require a lot of skills, and in the end the odds will help them, so they’ll manage to get a job as a programmer. Is it so bad, considering that it’s most likely not going to be any critical position, and the only ones that will be damaged will be the owners of the company that hired them? Well, the point is that this is not true. There’s someone else who gets damaged, in this scenario. I’m talking about the community out there, the good programmers, who find themselves competing with newbies who’re happy to earn peanuts. The salaries keep going down, and customers are not able to distinguish a good job from a good one.

In a comment on the previous post of mine about this subject, Hoowie Goodell really gets a great point with this paragraph:

“There has been a great effort to industrialize programming, too. Again, there are many good features, and it’s a field I’m interested in. Building a large program requires a structured approach. Language design, libraries, programming frameworks and IDEs can and should incorporate as much existing human knowledge as possible — computer science, domain knowledge, solid pre-written code and human interface principles. (Check out Thomas Greene’s “Cognitive Dimensions of Notations” for some of the latter — I think of how programming tools fail to use them on a daily basis!)”

In a way, this suggests that the whole system is not ready yet, as it’s indeed years and years behind several other engineering fields, and that’s a good reason, probably, to explain why it’s so easy to fail at being a good programmer. Let’s just try to get some insightful inspection points, in order to build better generation of programmers:

  1. Better education.

    The whole higher educational system should be improved in several way. Worldwide. Nowadays, it looks to me that in many countries graduation is just a direct consequence of applying to an University. Unfortunately, this kind of problem must be addressed on a country-basis, to properly identify the specific issues, but still the options that I would like to consider are worth mentioning. It all comes down to a single point: there should be less tolerance towards people that don’t learn. The thresholds for succeeding in a course should be raised to greater difficulty. Current models of testing should be seriously revised, so to ensure that students that really didn’t understand the subject are not going to make it.

  2. Better tools.

    Are we trying to make programming just like a building-chain or are we not? If we are, as it seems nowadays, then the tools are not ready yet to second our intentions. Programming is too error prone and too time-consuming.

  3. Better process.

    Software process that doesn’t conform to some standards, say ISO-9000 (sorry if it’s inappropriate, I’m not an expert on this kind of standards), shouldn’t be allowed to sell. Quality insurance committees should be taken more seriously as being part of the process. This might be against all principles of liberalism, I know, as bad software, you may say, will not sell anyway. I know many bad software that did sell well, for greatly different reasons than its (non) good quality.

  4. Better judgment when hiring.

    I’m not going to try to teach you how to run your company, nor how to hire your crew. But sometimes really crazy thing happen (again, is Paula around?). A very interesting post by Joel Spolsky (I’m sorry, I can’t find it anymore: does anybody know the link?) talks about only hiring “A”-people, where “A” means top class. If you’re ever hiring a “B”-person, he’s quite likely to hire a “C”-person, someday. After that, it’s chaos. I recommend anyone not to lower their canons of perfections. Here’s another great article by Joel, about hiring good developers, I recommend it.

Concluding, improving the quality of programmers seems really to be a tough issue, and the whole thing depends on so many factors that tracking a precise problem is impossible. Cultural and technical difficulties arise all the time, and getting clues is hard. I’ve tried to get around the problem and give some insightful opinions: what do you people think?


Get new articles via email

Related posts:

Why most programmers are lousy

by Salvatore Iovene on 8 March 2007 — Posted in Opinions, Coding, Articles

I’ve been in the IT field long enough to get to know many programmers, both experienced and just wannabies. During this time, I’ve realized that most of them are just bad programmers, simply said. I find myself agreeing with a brilliant post by Jeff Atwood, which alleges that programmers can’t program. What are the reasons for this? Many. Probably, IMHO, the main fault has to be addressed to the lousy education that people receive. But then again, the ability of giving education remains directly proportional to the ability of getting it, and where I see people complaining about low quality of education in University, I also see students with no interest in learning. Let’s see some of the reasons why programmers can’t really program.

  1. Young people study Computer Science just because it’s a trend. It sounds almost unbelievable to me, but I must admit it’s mostly true. The vast majority of my old University mates just applied to the Computer Science department because… well: everybody was doing so. They followed the rest of the sheep.
  2. Young people study Computer Science because they wouldn’t know what else to do. That’s really another strong source of applications to Computer Science. A lot of young people in their teenage years just don’t know what they want to do as grownups. Computer Science still seems to be a good career opportunity, so they just go for it.
  3. Young people study Computer Science because they think it’s a sure way of getting a job. 10-something years ago there was a big boom, and if you just knew some HTML, were thought to be a computer guru. These types of belief mark a deep footprint on popular sayings, hence the wave of people applying to Computer Science just because they can work, is still there.
  4. Many of today’s programmers, were doing nothing else than surfing the net or using Word till last year. Especially in small and vertical based markets, improvisation just rules. People learn something, and literally throw themselves on the field. Drawbacks for quality of their work are simply inevitable. This is not only a group of illiterate people that just jumped in to catch the big wave (what big wave, nowadays?), but people with no passion whatsoever. In other words, I don’t think it’s possible, nowadays, to become a great programmer if you didn’t start getting some interest in the field when you were very young, say about 10 years old (with the due exceptions, of course).
  5. Many of today’s Computer Science students have no interest whatsoever in what they’re forcefully studying. Just put together the previous items in this list and what do you get? A bunch of people who just don’t care, who want to get their piece of paper (the degree) as soon as possible, and have absolutely no passion in what they learn. That’s the worst. I strongly believe that programming is not just a job like many others, but you need passion to get best at it.
  6. A lot of programmers just don’t like to program. This goes for 100% of my ex University mates! Think of that: 100%. Of course it’s not the whole world but it makes a small statistics.
  7. A lot of programmers just don’t get it. Not even the easy things. I was asked, few weeks ago, by a friend of mine who’s been studying Computer Science for now 4 years, what the difference is between a private and protected method in Java. Apparently reading the books isn’t enough anymore, nowadays. Another guy asked me: “I’ve studied pointers in C, and I think I understood them. Still I can’t find any use for them… are they really used at all?”.
  8. Basically all of the programmers, or wannabe programmers, mentioned above, are miles away from the technical community. These people will totally ignore the existence of:
    • Slashdot and similar
    • RSS
    • Usenet
    • IRC (“Is that like MSN?”)
    • SVN and similar

As you can see, a really strong point, in my opinion, is the lack of care and passion for the subject of programming itself. Lousy programmers are bound to program to take a wage home; good ones are bound to program for the sake of programming itself. Or course you can do that but still miss to be a good programmer, but all falls down to numbers.


Get new articles via email

Related posts:

Please stop talking about iPhone clones

by Salvatore Iovene on 13 February 2007 — Posted in Opinions, Articles

I can read, basically every other day, some website going nuts about some iPhone clone. Just few minutes ago I read about the nVidia GoForce 6100, and googling for “iPhone clone” really confirms the fuss. Well, the truth is that the iPhone actually is the one coming late, possibly the cloner, rather than the cloned.

I’m not working at Apple Inc., but, being a software developer and happening to have also worked for a while in the development process of a high tech device, I know, as many others, that the process that leads to the birth of a complicated gadget like the iPhone, takes years.

Digg.com has gone completely crazy about the subject. A Google Search about that subject on Digg, returns 5520 results.

Given that Apple Inc. will release the iPhone only next Fall, and that there are many devices already out there, which have been yelled at as mere “clones” (absolutely disrespectfully, IMHO), how can you people abuse the term so much? I’m assuming that nothing really serious leaked from Apple, so the competitors didn’t just rush to make their own touch screen phones. The truth is that the technology started to be ready, and the market started to be ready too, at the same time. Some people missed the opportunity and couldn’t even accept it, some other realized the chance and went for it.

I hope that the abuse of the word “clone” will cease to exist, and that, from now on, everybody will just talk about “another touch screen phone”.

Here’s a photo-list of alleged “iPhone clones” so far.

Samsung’s Ultra Smart F700 Asus Aura
Samsung's Ultra Smart F700 Asus Aura
Meizu M8 LG KE850
Meizu M8 LG KE850


Get new articles via email

Related posts:

Please drop SVN

by Salvatore Iovene on 8 February 2007 — Posted in Opinions, Versioning, Articles

SVN might be stable, it might be mature, it might be successful, and it might be the winning source control system of the moment. There’s always a big risk of resulting unpopular, when criticizing something that actually did find its way to success, but I have to say that SVN sounds terribly antique sometimes.

I have already given a brief introduction to the Darcs source control system, and I would like here to talk about a very strong point it’s got against SVN.

Just yesterday, at work, I needed to commit certain modification to SVN. As I examined the diff of my local copy with:

svn diff

I realized that one of the file also contained some other modifications that I didn’t want to commit. After using Darcs for several months, I was suddenly hit by the shocking truth: SVN doesn’t allow interactive and partial patches, which Darcs names hunks.

What do you do in that case? Provided that there are people who actually abuse the Save as… function of their editor by saving multiple copies of the same file according to the logical patch they contain (which I find absolutely horrible), the quickest way I could find was to:

  1. Making a diff: svn diff > logical_patch_1.diff
  2. Edit the diff manually, until I had two files, which represented the two logical diffs
  3. Revert the pristine: svn -R revert .
  4. Apply the first diff: patch -p0 < logical_patch_1.diff
  5. Commit: svn commit
  6. Apply the second diff: patch -p0 < logical_patch_2.diff
  7. Commit: svn commit

With Darcs, all you have to do is issue the darcs record command (which records your changes):

  1. Record: darcs record -m "First logical patch (fixes bug 1234)"
  2. Answer “yes” to the first hunk, and “no” to the second.
  3. Record again: darcs record -m "Second logical patch (fixes bug 5555)"
  4. Answer “yes” to the only hunk

Can you see the difference? It’s not just about the number of operations needed, but the quality of them, and the fact that Darcs is perfectly oriented to this kind of flexibility. Please consider switching to Darcs for your projects and work, as it’s a mature and better system.


Get new articles via email

Related posts:

Steve Ballmer on the iPhone: pathetic

by Salvatore Iovene on 18 January 2007 — Posted in Opinions

Thanks to Digg I just found out a certain video on YouTube. Steve Ballmer, Microsoft’s CEO, is asked what he thinks about the iPhone. I wonder how much the MS guys are aware of their image, or conscious of what they do and say. I’m sorry, I don’t want to be harsh, nor I want to disrespect Mr. Ballmer, whom I don’t know personally, but his comments in that interview were outrageously ridiculous. Meaning that they made me laugh my head off.

Steve Ballmer

First of all, Mr. Ballmer was shouting pretty loud, and that’s terribly impolite. His all line of answer was about mocking the competitor (Apple, in this case) with an eery smile between sarcastic and frightened. It’s really an old technique of blabbers like him: undermining the competitors’ value, and pretending it doesn’t pose a threat at all. He says “That is the most expensive phone in the World and doesn’t appeal to business customers because it doesn’t have a keyboard, which makes it not a very good email machine”. First of all, this is totally and absolutely questionable. Secondly, the iPhone might be plugged to a bluetooth keyboard. In any case, that doesn’t matter at all. Mr. Ballmer was daring to express his lousy personal opinion on the sole obvious purpose to undermine the competitor. He’s just trying to blow smoke in the eyes of the users. I don’t want to start any anti-Microsoft issue here, but it’s definitely obvious that Ballmer is scared and falling into pathetic attempts to damage the competitor.

He then continues with “We have our strategy, we have great Windows Mobile devices in the market today, you can get a Motorola Q phone now for 99 dollars”. He stresses the “99 dollars” a lot. Well, if having low-cost lousy device (which you don’t actually build! It’s a Motorola, isn’t it?) is the only way to keep your share, then be my guest, but I see no sense in mocking Apple for the price of the iPhone, and then giving no real arguments. It looks like they want to sell their Windows Mobile powered (under powered?) devices by the pound. That’s lousy. He continues talking about the Motorola Q, saying that it’s a very capable machine, it can do music, it can do Internet, it can do email, it can do Instant Messaging. “So I kinda look at that, and I say I like our strategy, I like it a lot”. The original question he was asked was about the iPhone (which he just mocked for the price) and the Zune (which he didn’t mention at all). So the interviewer felt about having to repeat the thing, because it was obvious that Ballmer was kinda afraid of the subject. The interviewer asks, talking about the phones market and the music market, “How do you compete with that?” - and there you can see Ballmer go with a sort of dull expression for a moment - then replies “Let’s start with the phone” (apparently he really doesn’t want to go to the Zune) and says that at the moment Microsoft is selling “millions and millions and millions” (how many is that? 3 millions?) of phones, and Apple is selling zero. I’m amused: that was his argument. “How do you compete to the iPhone?” - “That’s not a threat”. That was his answer, minus the bullshit. Then he says again that the Apple iPhone will be the most expensive phone “by far” ever in the market - then smiles - and says “Let’s see”.

Then he finally mentions the Zune, and says they’ve got 20% of the market. What market? The market of the devices over 249$. That’s not the market. It’s only a part of it. I don’t know what you people will think about this, but it gives me the impression that the phones market is going to shake badly.

By the way, it’s so funny how he goes on and on about the price, when they dare selling a completely bloated Operative System for 400$ or something, but that’s just my opinion.

Crazy Steve Ballmer

Besides, Mr. Ballmer probably is not aware that when everything will settle up in one year or so, this video is going to get back at him, and be extremely hilarious. Good job, Microsoft. On the other hand, what else can you say about this man?


Get new articles via email

Related posts: