Saturday, September 25, 2010

Keyboard is Faster

Do you know this guy that uses only VIM? Did he already told you he uses VIM because you can achieve everything using just the keyboard? No?

At the times I'm not at home/office, or at the times I want to watch the beautiful sunsets from my porch, I work using my laptop, instead of a regular PC. While I like the laptop keyboard far better than a regular keyboard, I hate the touch-pad. It's just not usable.

So whenever I work with my laptop, I get to learn some new keyboard shortcuts, since it is the only thing that keeps me sane.
Recently things got a lot better, since I started using the keyboard shortcuts provided by Google's products, especially GMail and Reader.

While GMail keyboard shortcuts requires you to turn them on via the settings, you get those for free in Reader. If you can't remember a shortcut, simply press "?", and you'll get a nice popup reminding you whatever there is you need to know.
What I like best in the combinations they chose, is that they remind me the shortcuts of UNIX utilities (yes, VIM included). I guess this was intended, and I'm thankful for that.

Thursday, September 9, 2010

So What's On Your Reading List

I had this post in my mind of quite some time, but couldn't find the time to write it. Good thing there are holidays.

Finding great people for hire is difficult. More than once an employer would be looking for people which are interested in what they do, and not just good at it. Such people would usually be more passionate at work, and work harder and better that others.

One technique not many employers are utilizing, is asking what's on the RSS reading list of the potential employee. Come to think about it, it's a great way to see what the person is passionate about.
It doesn't mean that if one goes to an interview at some company that does media streaming, should read media-streaming blogs. But if the person is going to be a programmer, and happens to be reading Coding Horror, that's a great plus.

A thing I like very much in my current workplace (M86 Security) is that we have a must-read reading list. That means that every team member receives an OPML file on the first day on the job that contains stuff that he must read on a daily basis.
This helps turning the team members into pro's, and will certainly help the company and our future careers.

Tuesday, September 7, 2010

Working With ToR In Python

I bet I'm not the first one who ever needed to write a script that downloads something via ToR.
Apparently, there isn't much information regarding how to request a new identity or how to use the ToR proxy in Python. So here's a gift from me to the world.

First, while not necessary, I always use a new ToR identity prior to download something through the ToR network. The code looks like:

import socket
def renewTorIdentity():
success = False
s = socket.socket()
s.connect(('localhost', 9051))
s.send("AUTHENTICATE\r\n")
resp = s.recv(1024)
if resp.startswith('250'):
s.send("signal NEWNYM\r\n")
resp2 = s.recv(1024)
if resp.startswith('250'):
success = True
return success

That would work assuming "authentication" is set to none in the Vidalia control panel.
After having a new identity, downloading a file is really simple, as Vidalia comes bundled with privoxy configured on port 8118. Here's a sample code for downloading something:

import urllib2
url = "http://something-to-download"
proxy_support = urllib2.ProxyHandler({"http" : "127.0.0.1:8118"})
opener = urllib2.build_opener(proxy_support)
opener.addheaders = [('User-agent', 'Mozilla/5.0')]
response = opener.open(url).read()
That's it. Simple.

Wednesday, September 1, 2010

Blog Day 2010

After missing it last year, and in one day delay this year, I'm celebrating today the blog day.

So here is my list of recommended blogs, not ordered by any specific order:
  • Miguel De Icaza - While it is popular to hate MS technologies, I do think mono is a great thing and its founder a very smart person.
  • Paul Graham - The father of Y-Combinator. While not exactly a blog, this one is really interesting and insightful, especially to would-be entrepreneurs.
  • Doc's blog - Did it ever happen to you that you met someone with much to contribute to the world (in terms of blogging, but not only), that just didn't reach their potential (yet)? Well, I hope that this post will make Doc to publish more of his clever insights and musings.
  • Lessons Learned - Yet another must read for would-be entrepreneurs. Nothing I can add here.
  • ZuLL - Well, I can't deny the fact I'm part of the security industry in Israel, and Guy writes about interesting stuff.
Still, looking a bit back, it seems I removed more blogs from my reading list, than I added. I really hope I'll come across new and better ones this year, so I'll have novel things to recommend on next year.

Saturday, August 14, 2010

My 5 Cents On Oracle vs Google

This seems to be the hottest topic in the past two days: Oracle sues Google over some JVM patents.
Long story short: When Sun GPL'd Java, it did so only for the standard JVM. The mobile version requires every mobile device vendor to license (=pay Sun) its usage.
So Nokia paid, and so did others, but Google wanted more. Google wanted the standard JVM. And here starts the problems: the standard JVM license doesn't allow a company to create a superset (nor a sunset) of the JVM. What does that mean? That each JVM must pass Sun's testing kit that verifies the newly created JVM behaves just like Sun's.

So instead of settling for the standard JVM, or license the ME, Google decided to create their own JVM. Only it is not a JVM, rather a superset of it. But that's forbidden, so Google solved it quite cleverly - they created a totally different VM. The Dalvik VM isn't bytecode compatible with Sun's, and implements parts of the JVM that would have never pass Sun's tests. In order for developers to migrate from one VM to another, the code must be either recompiled or use a special tool that converts the bytecode.

Now that Oracle owns Sun, Oracle does what's good for Oracle, which means pursue their patents. I bet they're expecting Google to pay some ransom in order to keep this story from exploding, and scare developers back to iPhone development. But if Google would do so, it'll give Oracle a case to actually pursue every mobile phone vendor that uses Android, and it'll be very bad for Google.

Some suggest Google would opt to use a different VM, such as Mono, but I seriously doubt it. Not only because C# sounds like "Microsoft .NET" (a thing which I completely disagree with), but because developers are expecting them to keep the same language they use today, so they won't need to learn a new language and slow down their development cycle, even for a little while.

This does raise another issue: the Maemo, Meego and other Linux-based mobile OSes can theoretically run the standard JVM, but Oracle won't allow it, since it wants mobile devices to use the ME (this is where the money is). Does this mean we can expect to see Java on those devices? Or could Mono be the answer here?

As for those people asking "why would Sun/Oracle charge only for the JVM ME usage, and not for the other versions", here's what I think: A good software company would like to make the developer's life as easy and cheap as possible. So the JVM on the desktop (the development machine) is free, and so does for the server (for web applications). The price of the ME rolls over to the end-user, which is best for developers. For comparison, both Apple and MS charge high prices on both ends.

Monday, July 26, 2010

M86 Security Is Hiring

Just in case you missed my Buzz feed and the official job offering in LinkedIn, here it is: M86 Security (formerly Finjan) is hiring in Israel. The company is looking for Security Researchers, Software Engineer and Testing Engineers.

You can go over the job description in the official web site.

In case you are interested in more details or just want to apply for one of the jobs, you can contact me.

Good luck.

Saturday, July 24, 2010

Browsers in my toolbox

Like with other products, the web browsers market is full with flame wars. Many people claim they use browser X, and that this is the best browser ever, and everyone should use it.

For me this is not the case. As a developer and a heavy user i use at least two different browsers every day. I cannot choose a winner when comparing them, and cannot give up on any. Both are a MUST for me.

Google Chrome/Chromium
I like Chrome because it is lightning fast, lightweight (loads in a sec), works perfectly smooth on a weak laptop (and its battery) and it is also safer (process isolation, less bugs) and more stable than any other browser. Most of my web surfing is done on Chrome.

Firefox
For me, Firefox isn't a fox, but rather a horse. It carries the real heavy load of my web development. Tons of mature web extensions makes my life much easier when developing stuff. Examples for useful extensions would be FireBug and SwitchProxy. Also, I love the directions this browser is headed to.

For me, this richness of those two browsers is great, and I'd love to keep using them both, without having to choose a winner.