Bing Is Not Google

There is a popular drug in Nigeria called panadol. The manufacturers have this funny advert and the last line says “if no be panadol, he no fit be like panadol” meaning if its not panadol, it can not function like panadol.

I have read a lot of posts online about bing and truthfully most of these posts looks like microsoft sponsored to me. Bing is an awesome search engine, the best thing from microsoft in years. But to say because it has a few features that Google didn’t have makes it better than Google, please say something else. Here is my 2cents on the bing issue.

Bing’s features are OK, I used it for some time too, just to get a feel of it. It is a very good product keeping in mind that it is coming from the same stables that produced Vista. But I have to go back to google after a while. Apart from the fact that google is an habit, “if no be google, he no fit be like google”. I will show you a few examples.

goto www.bing-vs-google.com

type without the quotes “define:dashboard”, then “define:netbeans” and then “define:java”. I use this feature often, because it not only helps me with definitions but also with spellings. If you dont see any difference, lets move on to the next

type without the quotes “1cm in m”  bing wont do the conversion for you and it wont even suggest that you should type “1 cm in m” instead. Obviously the space between 1 and cm is very important for bing to work. But at least tell me so. It was when I was composing this post that a friend pointed out that i need the extra space between 1 and cm. lets go on

type without the quotes “filetype:PDF softpedia” “filetype:PDF java.sun.com”. The results speak for themselves. When I want to download something from a site, I also use this feature.

other ones I have come to use often are

info:www.java.com, weather:Lagos and lots more.

My point is, it is not about the search or the fact that I can preview sites and videos(I have firefox plugins that does that, I almost felt it is normal) or that you can show me search history or that you have a finer homepage, or that you have nifty shortcuts for doing things, it all boils down to the things you are used to doing, habit. Say what you might, I know people who still use IE6, out of habit. Bing is a very good search engine, better than most competitors and competition is good. But at this stage if anyone think bing is better than google, I also think the person should re-evaluate. I work in an IT company and we also have non-technical staff members. I asked them their opinion and 90% of them believed google is better. I asked them to continue using bing for two days and after then about 80% still prefer google. These are the same people who prefered firefox over IE6 in the first 30mins of use. If anyone think microsoft will have it smooth as it does with netscape, they should rethink. I just hope this is not another Zune project. This post http://www.roughlydrafted.com/RD/RDM.Tech.Q1.07/050A729F-9A90-41FB-8788-CEB0DF3455E9.html is a 2007 post comparing Zune and iPhone. The writer definitely knows better now. Time will tell…time will tell.

Leave a Comment

Profanitometer

If there was ever a device like that, I would be running at full speed, say around 400 to 500 KM/h. I used the F words, B words and any other profanity you could think of. I say b..lshit without blinking an eye, My use of f..k is underrated if you say I used it like 1000times a day. I am wondering if this is a trait of programmers or I am just being naughty…..

Let me give you an example, when I am working on something cool and I got it working, I will look at myself and say I am f..king bad guy, or say I am the bada** hacker. If it aint working you will hear me saying b..ls**t over and over and over….you will also hear me saying f..k this guy or screw that nigger or stuffs like that when I see codes that pissed me off(i dont say it to the programmers face lol). When something says something or does something funny, i will say that dude is f..king crazy. I found out that I use the profanities more when I am programming, around computers or around other programmers. And my case is somewhat mild compared to some of the other programmers I converse with. One dude in one of the companies I have worked for used the word so much so that management passed a “no F word before 4pm rule!”.

Today I was directiing someone to do something for me over yahoo messenger, He said the thing will take about 40mins to complete, I expected it to take less than 15 mins and the next thing I typed was b…ls**t. The guy responded with “what is that?” and then I realised I have used the profanity word with someone I shouldnt have used it with. This is not the first time something like this is occurring.

My question is, is this a programmers’ trait or is it just me?

Comments (8)

The Tale of Two Carpenters

Why is it a good thing to have personal frameworks and libraries, why don’t I just build a monolithic system, that does one thing and does it good. Let me tell you a story of two capenters.

Adrian the first capenter likes build things. He can build anything giving the proper amount of time and motivation.

Sean also loves building things, but he hates doing the same thing twice.

One day a company approached both Adrian and Sean to build a special kind of chair for them. They did this so that they could pick the best from both. Adrian was the first to turn in his prototype. He has it all well planned and thought out. They liked it and told him they will get back to him before long. They have to wait another two days before Sean could turn in his own prototype. They also liked it, It looked so much like that of Adrian, they have both followed the specifications well. When the time for choice came, they chose Adrian over Sean because he took less time in building his prototype.

Problems started when the have a new staff member who wouldn’t fit into the chair because he was….rather big. They need to modify the SEAT. They called in Adrian and he said no problem, he went ahead to modify the CHAIR, adding a new kind of seat. It took him as long as it took him to build the chair to modify the seat.

Over time, these modifications were becoming more and more frequent and Adrian has to build a new kind of chair almost every other week just because of a slight modification. It came to a time that the company weren’t happy and began complaining. They went on the lookout for Sean, just maybe he could help them.

They found Sean and told him their problems. He laughed and said that it wasn’t a problem at all, and then he told them why his prototype took a bit longer to produce.

Sean, unlike Adrian didn’t build a CHAIR. He built the components that make up the chair. He built the front legs, back legs, arm rests, back rests, seat etc. It took him as long as it took Adrian to complete the chair. After building the chair, he started assembling them and that was why it took him longer. But now the company suddenly saw the solution to their problem. Adrian built a chair and so each modification no matter how small will alter the chair. Sean built components therefore he will need to modify only the component parts that are affected.

I told this story to say that as a developer, I strongly believe that you try as much as possible to have a personal library. It will help you a lot in the long run. Those days when I was still naive, when I hear “library”, I don’t see it as a thing that I must build. My software are large and monolithic. A little change to one part of the software will make me pull down the whole bunch. Now I know better. Whenever I see a feature that I have used twice, either in the same project or different projects, It is going into a library. I am happier now than then.

Also when you have a large project, please and please MODULARIZE. You don’t want to know what trouble you will save yourself or the person maintaining that project in the future.

Leave a Comment

Java(TM) ME Platform 3.0 – Netbeans Platform based

There are so many cool things about the new j2me platform, but the coolest of them is that it is Netbeans Platform based. I am kinda used to the Netbeans Interface that when I saw it, I almost jumped from my seat with ecstasy(hummn that word!).

Anyway that is not all. The truth is that I am not very happy with the way netbeans generates codes for me when I am using it for j2me, I never did complain about this, but it seems the designers of this platform were reading my mind. The platform is really very stripped down.

Also, the emulators are far better than in 2.5.2(so we expected) but not on this scale. They were far far better than far far better could describe.

It also has support for javafx mobile(is that good news? you bet it is). It also has support for BD-J, LWUIT, and a whole lot more.

Setting up new emulators is also very easy, the whole netbeans platform base is a very very wise design decision.

I can also test directly on my pocket pc. This feature is also very cool.

The coolest feature however I think is the way it handles RecordStores. Most times when I am developing, and I need to store records. I find myself gooing to delete the created records after every run. This is not so with the 3.0 platform. when you run your app normally, and you shut down the emulator, it wipes all residual data left behind. To make data permanent, you will have to run via OTA(which makes a whole lot of sense).

You can call me a Netbeans fanatic, but I think most of these cool features are as a result of the decision to use the Netbeans Platform. Good things have a way of having “goodly spiral effects”.

Leave a Comment

Strict Rules

Dear All,

When in the office, please concentrate only on official assignments.

I repeat, I will be very upset with any member of staff who during office hours/uses company equipment/company resources for personal projects /assignments.

The time you spend in the office should be entirely for company tasks. I repeat, this is totally unacceptable to me and I will be extremely angry if I find this being contravened.

I see this as a sign of disrespect and dishonesty to prosper oneself against the collective good.

The company will do all it can to keep its side of the bargain in its responsibilities to you and the company expects that you will do same.

Thank you

Leave a Comment

Not necessarily necessary

When I started learning java, I was coming from a world of pascal, delphi and vb, so I believed there are a lot of things in java that are not necessary. As my experience with the language grows, I started seeing things in a different light. I will name some of the things I thought were not neccesary then, and then I will try and explain why I now think they are.

getters and setters. Why use getters and setters. I could make all my members public and just read them like that instead of using getters and setters. And for as long as I can remember this is how I do my things. Then one day, as part of a bigger API, I needed to write a user class. The illumination started when I found out that the requirements are these: The user of the API will supply the password in string and we will store the hash value. Also when he requests the password, we should reset the one in the db, generate a new one, store the hash and return the string to him.

As usual I wrote a helper class that does that. The problem is when you want to create a new user, you give the String password and call a save method. Then in the save method I convert the string to md5 and store it (and that works fine), but when you say user.getPassword(), it should return a new password hash and all that. I was momentarily trapped. That was when I remembered getters and setters. The final user class looks like this

public class User {

String password;

String username;

public User(String username, String password) {

this.setUsername(username);

this.setPassword(password);

}

.

.

public void setPassword(String password) {

this.password = md5hash(password);

}

public String getPassword() {

return newPasswordMd5Hashed();

}

}

Getters and Setters were introduced so as to overcome this kind of problem I believe. When you want to do something special at the point of accessing a variable. It is like overloading the = operator in c++.

Access Modifiers: Some days ago, I posted a joke on my facebook page. This is it.

A php programmer walked up to a java programmer and said “java is full of crap. The chief of these being what u guys call access modifiers…public, private, protected..etc. why have all that crap”. The java programmer looked up and said “lets assume for a second that I am God, and I make your wife public” End of Discussion.

The joke however is on java programmers. Thats talk for another day. I used to be like that php guy. Why all these access modifiers. All my members and methods are public, so I really dont need them(This is where I prefer scala, the default is public, unlike java where the default is private). But my User class above also taught me the need for access modifiers. The user class is actually a base class for some other classes, We have the ManagedUser, TimedUser etc. If I make the password field public, then the programmer that is using the API can as well just use the = to assign value to it. This will have very un-desirable effects. If I make it private the programmer wont, but neither will ManagedUser and TiimedUser. I need them to also be able to modify this field because we store the passwords differently for a managedUser and timedUser. I need to make the field protected.

When developing API’s that will be used by other people, access modifiers are your friend my friend.

Wrapper classes: why have int and Integer, boolean and Boolean, double and Double. Who needs wrapper classes anyway. But that is a lie, sometimes you will need them. One day you will need to write a method that takes an object as an arguement or that returns an object. primitives like int,boolean,double are not objects. You will need to have wrapper classes. What I wanted to do when this dawned on me was simple. Pass an Object to a method. This Object could either be an Object or a primitive. What do I do? Simple, use wrapper classes.

public void done(Object i) {

if(i instanceof Integer) {

.

.

.

} else if(i instance of Double) {

.

.

.

} else {

.

.

.

}

}

Abstract Classes: Now this one I didn’t get until very later in my java journey. Abstract classes, Interfaces etc. But let me explain it to you in simple terms. You will need these features if you want classes to fufil a particular contract. For example, I was writing a class Store as part of a J2ME Database Management API. Now any POJO that must be persisted must have two methods toByteArray() and fromByteArray(). If I were doing J2Se, I could have used reflections, I didnt have this luck with J2ME CLDC. So I rememebered Abstract classes and interfaces. So I make sure every persistable class must extend and abstract class I called StoreBase. The class itself contains methods toByArray() and fromByteArray() without any body definition. Any class that extends StoreBase can be persisted, but it must have definition for those methods, else your code wont even compile. EOD.

EDIT: The default access modifier for java is packaged and not private as erroneously stated above.  Thanks to Jose Ayerdis

public class User {
String password;
String username;
public User(String username, String password) {
this.setUsername(username);
this.setPassword(password);
}
.
.
.
.
public void setPassword(String password) {
this.password = md5hash(password);
}
public String getPassword() {
return newPasswordMd5Hashed();
}
}

Comments (4)

Programmers or Comedians?

I read this somewhere

There’s something weird about software development, some mystical quality, that makes all kinds of people think they know how to do it. I’ve worked at dotcom-type companies full of liberal arts majors with no software experience or training who nevertheless were convinced that they knew how to manage software teams and design user interfaces.

This is weird, because nobody thinks they know how to remove a burst appendix, or rebuild a car engine, unless they actually know how to do it, but for some reason there are all these people floating around who think they know everything there is to know about software development.

Its pathetic because you see a lot of them tout certifications as if it’s ever a yard stick to measure how good they are? I wonder if I will be glad to allow a Doctor perform a brain surgery on me just because he knows how to treat malaria, or because he just graduated from medical school. They boast and brag about things they know nothing about. My boss will say they are name droppers. Myself and my friends have a name for them, we call ‘em comedians. What else they could be? I interviewed one of them for a programming post in my company. Since he said he does Java Programming as a hobby and that he even has a mobile game he wrote in java that talks to a JSF back-end. The back-end itself relies heavily on hibernate as persistence layer(now isn’t that wonderful?). He has about three certifications..if not four. (CCNP, MCST and SCSA), I asked what IDE he is conversant with(expecting to hear Netbeans so that I could add a +1 to nigerians that use netbeans poll I am secretly compiling), his reply was “Websphere, JBoss, etc”..now isn’t that what a comedian will say?

Comments (7)

Over Configuration

Most times, I don’t start out with configuration file(s)…..what I do is simple, I create a class with static variables and I assign them values. After I finished the project, I will then create a configuration file and then my class will have a constructor which I will call from my Bootstrap class or main class. What the constructor does is simple…assign values to the static variables from the configuration file. This is something I have been doing for a while and today I felt its just awkward to do things like this….I think there should be a better way to do this bearing in mind that I still don’t want to start developing with a predefined configuration file….I want to be able to determine either or not I want to use a configuration file only at the end of the project…..so I devised a new method. instead of static variables and then a constructor, I used static methods. The methods could just return a value(especially during tests) or read from the configuration file and return the value read.

For example,
public static String getHost() {
return “localhost.localdomain”;
//read this value from the configuration file.
}

I have a Configuration File helper that I use to read from configuration files.
This works for me now, and I think I am gonna be using it for another x years. :)

Leave a Comment

Windows Experience After 4 years

I stopped using windows in 2005/2006 can’t really remember the year now. I have this sony viao i have been using since last year….I installed Ubuntu on it and after some time I grew tired of it and installed fedora(I have always prefered rpm :) ) The beautiful thing is I dont even have to format although I installed the fedora on the same partition as the Ubuntu…anyway, I got another system last month, and I deceided to install windows on the sony so I can at least play around with vista, I installed the windows yesterday(Sunday) and by 3pm today(Monday) my system crashed. I inserted a sony SD card and it hanged the system. I have to power off the system as the ubiquitous ctrl+alt+del was not working. After the restart. it starts complainint that it can not boot because a file was missing….it recommends that I repair with the installation cd, I did and yet the file was still missing….I tried everything I could and after 3 hours…I have to format and re-install…..Welcome to the world of Microsoft Windows.

Leave a Comment

What happens to MySQL now?

With the rumor that Oracle might eventually buy Sun, the most glaring question in mind is..what happens to MySQL now?

Comments (1)

Older Posts »