Tomer Gabel's annoying spot on the 'net RSS 2.0
# Thursday, 28 September 2006

Scenario: a couple friends and I want to go on vacation. So we go to a local travel agency's website and order a bunch of flight tickets. I give my credit card information, and a few seconds later I get a "transaction complete" notice and merrily call my friends to let them know that the deal is sealed.

Half an hour later, I get a phone call from said company. Oh they're so very sorry, but actually the flight is booked and they can't give me my tickets. Instead they offer a cheaper flight which either leaves or returns at a different time, or a much more expensive ($90 per person) flight instead of the one we were interested in. Bait and switch? Who knows, but working under the assumption that their ass is covered I took the liberty of examining their terms of service page (warning: Hebrew) and managed to find some very interesting bits (my own translation):

  • The part of the document where you "authorize" the company to bill you also includes, at the very end, a statement in which you (the customer) say you are "interested in details regarding call-card benefits outside the country, and hereby agree to be contacted by a representative of [the travel agency] or [associated phone carrier]." I would think that this is the sort of opt-in they would at least provide a check-box for.
  • Regarding hotels: "For your information, the supplier reserves the right to transfer you to an alternative hotel of similar rating, or higher for an extra payment of up to $100 per person... The hotel rating is according to the local Tourism Office and should not be used for comparing hotels in different countries." So basically, the carrier can (at their whim) screw you over, which may even incur additional charges.
  • Still on hotels: "In the case where, as a result of changes to the flight schedule, the customer loses prepaid sleeping privileges at the hotel or additional costs are incurred, [the travel agency] will not be held responsible to said costs." I wonder who is responsible - the flight carrier? I seriously doubt it, their ass is probably just as well-covered.
  • Otherwise, the document is basically full of "we're not responsible if" statements. Beautiful, I don't think the travel agency can be legally held responsible for just about anything.

Aside from being seriously pissed off at having my vacation ruined before it even started, it really annoys me that the various travel agencies in Israel are perfectly OK with screwing their customers over. The fact that it's legal (and maybe it damn well shouldn't be. Doesn't this fall under the definition of "false advertising?") doesn't make it any more reasonable. I hope the situation isn't quite as bad elsewhere.

Thursday, 28 September 2006 16:08:34 (Jerusalem Standard Time, UTC+02:00)  #    -
Personal

(This is the first in a series of posts, in which I will try to articulate the various problems of communication in the software field and possible ideas on how to solve those problems.)

One of the most interesting aspects of being a software developer is communication. Perhaps the single most important trait of a good software developer is the ability to communicate with varying audiences:

  • First and foremost, a software developer must be able to communicate effectively with the other developers on his team. The usual tools apply: e-mails, whiteboard, hall meetings, source code comments. For a developer this is relatively easy, since it is unnecessary to translate the technical abstractions into a coherent conceptual model: the abstractions themselves are familiar to all sides of the conversation.
  • A software developer must also be able to communicate effectively with his team leader, project manager, boss - whatever you want to call it. This isn't quite as easy, as such communication can have serious repercussions on the project, the work environment and - potentially - the developer's career. Managers are usually not privy to the ultra-technical subculture of software developers, and although they almost always come from the same background they have just as often given up on subtle technicalities.
  • Finally, a software developer must be able to communicate effectively with clients. At some point in almost every developer's career he is required to meet and at least converse with a client, sometimes in order to figure out a bug, sometimes in order to gather requirements for a new project. A lot of developers would rather avoid these encounters because they are forced to re-think everything they say and translate abstractions. A client is not, generally, heavily interested in technical matters, so these must be explained carefully and coherently; most developers I know find this process frustrating and draining.

A developer that delves into management is assumed to already be proficient in the above scenarios, but management brings a whole new slew of communication problems to the table:

  • A manager is required to communicate with clients on a whole different level. When a developer is asked to make an estimate, the estimate forms a basis for the cost and schedule estimates his manager provides to the clients. The difference is that the manager is required to explain these estimates and is personally accountable to same. It is the manager's job to continuously communicate with the client, reassure, explain and assume responsibility for whatever pitfalls and hurdles the project encounters, and generally make sure the project is on track. A manager is also required to act as a filter between the client and the developers on the team for everyone's sake: on the one hand the manager is required to "protect" the developers and the project from ridiculous requests and whims on the client's side, and on the other hand he is required to make sure the client's requirements are fulfilled to his satisfaction.
  • A manager must communicate effectively with the developers on his team. He must establish trust and confidence, so that he can constantly be aware of what goes on with his team while avoiding micromanagement and wasteful status meetings. This isn't easy because the manager and the developer are fundamentally on opposite sides: efficiency vs "doing the right thing", choosing wisely instead of following trends, cutting corners instead of continuous refactoring and improvement. The only glue they have is the desire for a successful project. A good manager must communicate his decisions to the developers on his team to constantly maintain the trust and confidence he has built; a frustrated or uptight developer is an inefficient developer.
  • Finally, a manager must be able to communicate effectively with other managers. This is the least trivial form of communication for a variety of reasons: sometimes the corporate atmosphere requires managers to be ultra-competitive. It is hard working for a shared goal ("the good of the company") when one is constantly competing with one's peers. Even lack of competition can be an issue when two managers from different schools of management must collaborate, or when one manager is frustrated by the other's inefficiency. And even when all managers are equally efficient and equally dedicated to the shared goal, they must still share information between them and make sure the collective company process is on track.

You'll notice that the two lists are in opposite order. This is no coincidence; I ordered the lists so that the more difficult of the tasks are further down the list, so for developers the most difficult form of communication is usually with customers, whereas for managers it's communication with other managers.

The next post will deal with knowledge management and how we've used a wiki internally in our organization to alleviate the overhead of communication between managers.

Thursday, 28 September 2006 11:35:37 (Jerusalem Standard Time, UTC+02:00)  #    -
Development
# Wednesday, 27 September 2006

No idea where I found the link (but someone definitely deserves credit for that), but you gotta see this music video for Don't Download This Song, from Weird Al's new album "Straight Outta Lynwood."

Wednesday, 27 September 2006 12:19:48 (Jerusalem Standard Time, UTC+02:00)  #    -
Music
# Tuesday, 26 September 2006

This wasn't an easy riddle by any means. One has to either have a lot of experience developing both C and C++, or take a very hard look at the standards to spot the differences. Bottom line? I couldn't find a solution. Fortunately a brother and a colleague both came through:

Solution 1: Ugly Hack

Tal (one of my colleagues at Monfort) came up with the following concept:

#include <stdio.h>

int main()
{
	int a = 1//**/10
	;
	printf( "%d\n", a );
	return 0;
}

This deserves some explanation: originally C did not support single-line comments (//); these were added to a later version of the standard called C99. So what happens is, if you compile this code with an old C compiler the "//**/" string is parsed as a division operator and an empty comment, resulting in 1/10=0. A modern C compiler (or any C++ compiler) will treat the entire line as a comment and the result is 1.  One way to easily test this is to compile with gcc -std=c89 file.c.

Solution 2: Elegant Hack

I didn't have the time to properly look for a detailed comparison of C and C++ standards (I'll save you the time: this looks to be a good source). There are probably quite a few ways to achieve the goal, however my brother Mickey suggested one I find quite elegant:

#include <stdio.h>

int main()
{
	printf( "%d\n", sizeof( 'c' ) == sizeof( char ) );
	return 0;
}

Seems odd? Apparently one of the (relatively small) breaking changes between C and C++ is how character literals are handled. In C a character literal takes the type int, whereas in C++ a character literal has the expected size (source).

Tuesday, 26 September 2006 10:43:14 (Jerusalem Standard Time, UTC+02:00)  #    -
Development

Just when I was about to resume posting with full speed, my laptop breaks down. Another day, another dead hard drive. Hope to have it all sorted out in a few days.

As an aside, I updated to dasBlog 1.9. The upgrade was smooth (couple merged files and a lot of binary uploads) and everything seems to work - please let me know if something's wrong.

Tuesday, 26 September 2006 10:10:14 (Jerusalem Standard Time, UTC+02:00)  #    -
Personal
# Tuesday, 12 September 2006

Write a program that compiles under both C and C++ compilers, and outputs "0" for C and "1" for C++ (or whatever, the actual numbers are not the point). You obviously may not use compiler-dependant macros, __CPLUSPLUS__-type macros or anything of the sort.

Once again, I'll post the solution in a couple of days.

Tuesday, 12 September 2006 15:40:55 (Jerusalem Standard Time, UTC+02:00)  #    -
Development

Here's one possible solution for the riddle I posted a few days ago:

  1. Replace i < N with -i < N
  2. Replace i-- with N--
  3. Replace i < N with i + N

This isn't a particularly hard riddle - it took me about 10 minutes to come up with the solution, although I imagine a developer with more recent C experience will be much quicker. Regardless it's a pretty good way to tone those C muscles.

Tuesday, 12 September 2006 15:23:00 (Jerusalem Standard Time, UTC+02:00)  #    -
Development
# Monday, 11 September 2006

These last few months have been some of the busiest of my life. Back in May I decided to postpone my studies in the Technion to resume working for Monfort full-time, and in the interim managed to complete several projects, visit several countries (besides China, which I already wrote about, I visited Japan, Hong Kong and Korea).

The net result was very little free time, which reflects in the post count:


(if you can't see this, you need glasses)

I want to get back on the horse, as it were, but I would also like to avoid ridiculous pledges that I have no idea whether or not I'll be able to hold up ("I pledge to write at least two major posts a week! No no, lets aim for something more feasible. I pledge to establish contact with an alien civilization by the end of the year!"), I'll make whomever is reading this a trade: I'll do my best to write more and more content, and you'll do your best to let me know what interests you.

Just to get the taste buds going, here are the current posts in the pipeline (i.e. open draft in Live Writer I'm trying to consistently work on):

  • Some free power tools (gnuplot, SVG, other GNU tools)
  • A comprehensive post about wikis, specifically MediaWiki and how our organization uses it to our advantage
  • A post about my two trips to Tokyo
  • Thorough review of the new audio equipment I've been buying lately
  • Occasional music/movie recommendation

If there are any specific points of interest, give me a holler...

Monday, 11 September 2006 16:32:01 (Jerusalem Standard Time, UTC+02:00)  #    -
Personal
# Sunday, 10 September 2006

Virtual PC is free, which is good. It is reasonably fast and functional, which is also good.

It has some bugs, which - surprisingly - isn't good. One of those is an apparently ubiquitous "Network adapter... failed to initialize because the address is a null address." A solution can be found via this blogpost. Weird, but works:

  1. Examine the key value at HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Class\{4D36E972-E325-11CE-BFC1-08002bE10318}\<nnnn>\DriverDesc to locate the desired host adapter where <nnnn> is a four digit number.
  2. Look at the GUID value for the NetCfgInstanceId key value.
  3. Add the DWORD key at HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\VPCNetS2\Parameters\Adapters\<guid>\Flags and set the value to 0 where <guid> is the GUID found in step 2.
  4. Restart the computer.
Sunday, 10 September 2006 17:38:59 (Jerusalem Standard Time, UTC+02:00)  #    -
Software
# Friday, 08 September 2006

A friend sent me this riddle (which I imagine isn't his, but nevermind) via mail, and I thought it cute enough to share:

Find three ways to change/insert/delete a single character in the following code, so that the resulting code will print 20 star characters (*). Remember, for each solution you can only change one character, and there are at least three different solutions.

#include <stdio.h>

int main()
{
    int i, N = 20;
    for ( i = 0 ; i < N ; i-- )
        printf( "*" );
    return 0;
}

I'll post the solution in a few days, feel free to yell "eureka" in the comment section or whatever.

Friday, 08 September 2006 18:26:24 (Jerusalem Standard Time, UTC+02:00)  #    -
Development
Me!
Send mail to the author(s) Be afraid.
Archive
<2006 September>
SunMonTueWedThuFriSat
272829303112
3456789
10111213141516
17181920212223
24252627282930
1234567
All Content © 2024, Tomer Gabel
Based on the Business theme for dasBlog created by Christoph De Baene (delarou)