Wednesday, June 25, 2008

Eclipse 3.4 kicks ass

Today is a big day for (Java) developers. Long story short. Eclipse 3.4 is out and it's great. Lots of new features, fixes and speed improvements.

Here are some interesting new features

New update UI. I don't care about the GUI change but hear this. You are no more required to search for required plug-ins before new plug-in installation. Don't believe me? Read this:

Unlike previous versions, you no longer have to find and select all prerequisites of the software you are trying to install.
Working with 64-bit Windows. Well... I don't care, but some sure do.

Close tabs with middle click. This is just nice. It seems like they care about us.

Java Editor Breadcrumb. I imagine this will be usable when you have lots of opened files with same names in different directories.

Rearrange content of files per drag and drop. Cool, but not worth it :)

Enhanced debug hover. We all know that Eclipse debugging sucks. Everybody, who have worked with Visual Studio know how superior VS debugging workspace is. Not anymore... almost...

And lots and lots and lots more...

Features I hoped for this release, but still missing.

Debuging still sucks. Though it sucks less it still sucks :(

My congratulations to Eclipse team on new release. Everybody can download it here.

Monday, June 23, 2008

I miss programming

It has been almost a month since I coded last time. My project manager got married and went to honeymoon leaving me with all the paperwork.  Moreover I am refreshing my memory for the master program exam coming next week. In the end the closest I get to programming is designing a common interface for lithuanian/latvian project. That's all! Not a single line of code in a month :(

As i said these activities take a lot of time so I thought about what can I do instead of programming while getting as much experience. Here is a list of things I did to replace programming while not actualy doing it:

  • I started reading "Beautifull code" by Andy Oram and Greg Wilson. In general the book is not great but some examples of beautifull code are sure worthy few posts in the future
  • I started reading more blogs about coding. This is like Playboy for me. Code examples help me forget about sex... I mean programming :)
  • I am thinking about the best language there is for me. My criterias are: speed, readability, testability. I did programming in PHP, javascript, C#, bit of ruby, java and python. So far the best for readability and testability is javascript, C# is best at performance (except asp.net), but python has nice balance. If javascript could be compiled on request It would defenetely winn.
  • I'm doing a research on how to write my own language parser (at first)

What would you do?

Saturday, June 21, 2008

Svetlin Nakov Microsoft interview experience

In his least post Svetlin Nakov writes that he rejected a program manager position at Microsoft Dublin even though he succeed in interview. While his rejection was based only on several times lower salary than he already had, we who would like to work at Microsoft at some time could learn.

Svetlin has posted all questions that he was asked at interview in Microsoft, because he wasn't asked to sign any NDA agreements.

Svetlin gives some examples of interview questions at Microsoft starting from basic ones:

Question 5: What is SQL injection? SQL injection is vulnerability coming from dynamic SQL created by concatenating strings with an input coming from the user, e.g. string cmd = “SELECT * from USERS where LOGIN=’” + login + “‘ and PASS=’” + password + “‘”. if username has value “‘ OR 1=1 ‘;”, any login / password will work. To avoid SQL injection use parametric commands or at least SQL escaping.
To medium difficulty:
Question 11: How you write a distributed Web crawler (Web spider)? Think about Windows Live Search which crawls the Internet every day. You have a queue of URLs to be processed and asynchronous sockets that process the URLs in the queue. Each processing has several states and you describe them in a state machine. Using threads with blocking sockets will not scale. You can still use multiple threads if you have multiple CPUs. The Web crawler should be stateless and keep its state in the DB. This will allow good scalability. A big problem is how to distribute the database. It is very, very large database. The key here is to use partitioning, e.g. by site domain. Take the site domain, compute a hash code and distribute the data between the DB nodes based on the hash code. No database server can store all the pages in Internet, so you should use thousands of DB servers and partitioning.
You can read other questions on his blog. To me these questions are actually very easy. Am I so good that I even don't see a challenge or there is something else here? I will find out only when Microsoft invite me for an interview I guess :) There is one other thing that touched me. The answer to second question is brilliant.
Question 2: You are given a string. You want to reverse the words inside it. Example “this is a string” –> “string a is this”. Design an algorithm and implement it. You are not allowed to use String.Split. After you are done with the code, test it. What will you test? What tests you will write? Elegant solution in 2 steps: 1) Reverse whole the string char by char. 2) Reverse again the characters in each word. You need to write a method Reverse(string s, int startPos, int endPos). Test normal cases first (middle of the word, beginning of the word, end of the word, 1 character only, all letters in the string). Check bounds (e.g. invalid range). Test it with Unicode symbols (consisting of several chars). Perform stress test (50 MB string). Write a method ReverseWords(string s). Test it with usual cases (few words with single space between), with a single word, with an empty string, with words with several separators between. Test it with string containing words with capital letters.
Svetlin, have you seen the answer somewhere before, or did that just hit upon you? A truly elegant solution I must say. Other answers were good too, though sometime I would offer other solutions. I am glad that that you didn't accept the offer. After all programmers are we : if(newSalary > currentSalary && newChallengeRate == currentChallangeRate) { currentJob.Stay(); }

Tuesday, June 17, 2008

Banking 2.0

I think Web 2.0 is becoming less hype and more mature idea. It already passed that point when serious white collars start talking about Enterprise 2.0.

Zopa is a Bank 2.0 project, based in United Kingdom. Zopa is seeking to allow it's users to lend and borrow money from each other.

The idea is just great. I mean as a bank you don't need to worry (at least not that much) about the risk you are taking, as borrower or a lender you get a smaller and larger annual interests respectively. This is a game when everybody wins. I just wish we had such site in Lithuania. 

Sunday, June 15, 2008

Conferences. How to find them?

Yesterday a friend of mine asked me if I could advice him where to find any conferences, seminars, workshops and etc. He was asking because his company offered him to pay for any courses he would choose.

Now you might think of this as an easy task. In Silicon Valley maybe, but not in Vilnius. There is just no good sites for finding conferences (sites with Google maps you know).

The idea.

The idea for today is quite simple. Build a web page where one could search for conferences in his area. Say, 100km around Vilnius. Who knows, I might even do it myself.

Saturday, June 14, 2008

RSS feeds posts. The less the better!

Today I was planing to study for post-graduation studies exams in 2 weeks, but got lazy and opened Google reader. I must say I am hardcore reader, I had 1000+ (probably 2k) unread entries which were waiting for to be read by somebody O_o. As I went through entries and entries and even more entries I thought about how many stuff that I don't care about was there. I have to mention that, though I have many feeds, I regularly remove boring and unread, so there is nothing I wasn't reading in two weeks, but still there was 80% of stuff I didn't much care about. Why is that?

I am puzzled! Really I am! I am waisting my time when I could instead study. I am using RssMime and ReadBurner to filter only what I need. This helps a bit, but quite much is left still. What I need is an advanced filter system which would strip the whole blogosphere buzz to satisfy my needs.

Any suggestions? A opportunity for start-up, maybe?

Idea of the day:

Write a program for local cell phone operator. An operator would allow you to download a program which will communicate to operator servers and store all your data there: SMS, incoming, outgoing calls, contacts. Using this program you will know how much every call cost you emidiatly,  be able to look at your friends friends, post twitts, be notified when one of your contacts gets near you and more. And guess what will happen if your phone was stolen. You just contact your operator and move your data to other phone.

Inspired by http://skydeck.com/