Saturday, June 25, 2011

30 Days. Twitter.

A while ago I started considering doing those 30-days challenges. The benefits are obvious, and the fact they're published gives motivation to actually stick to the plan.
So, I already have several such challenges in mind, and some were already started. For example, taking the stairs instead of the elevator in the building I'm living in. I'm on the 4th floor, so it is a "free exercise".

Another thing I had in mind for a while now, is using twitter. It happens to me every day: There's some new technology I want to blog about, but when I start thinking about the actual post, I realize it would take me no more than 2 lines. For example: I installed Firefox 5, and thinks it's great.
So instead, I opened a twitter account (@technomosh), and I'm planning to post those short musings there. Hopefully people will follow me, and discussions would develop.

What does this have to do with 30 days challenge? Simple. Basically, up until now, I wasn't a big believer in Twitter/Identi.ca/Buzz/etc. So my first instinct is to ditch the Twitter account a second after I opened it. Instead, I just installed the wonderful TwimGo on my N900, so it would be easier for me to post some tweets. Hopefully, in 30 days I'll know whether Twitter helped me in getting those musings off my head, or didn't.

Monday, May 30, 2011

A Quick Productivity Tip for Windows Users

As you may recall, I'm a big fan of keyboard shortcuts, and generally prefer those over using a mouse.

Still, there are keyboard shortcuts that are not comfortable, especially those that require the control/alt key in combination with a F key. For instance, Alt+F4. The reason for this is that one must lift at least of on his hands from the keyboard in order to use this combo.

Luckily, someone at Redmond thinks like me, and in Windows 7 (didn't test on other versions of Windows) one can use Ctrl+W to close the current explorer (the file management tool) window. Just like in your favorite browser and preferred IDE.

Too bad that in order to edit the current location, one still needs to use Ctrl+F4. I'd expect Ctrl+L to work. Anybody from MS reading this?

Wednesday, April 13, 2011

Needed: Ruby/Rails Developers in Israel

I just read Ido's great post, and couldn't stop myself from writing a response post.

Basically, what we have in Israel is a chicken-and-an-egg problem. Why? because there will be no Rails programmers if the market (=big # of companies) would require it, and no company would shift to Rails development if there would be no developers to make it do that.

The problem starts in the way developers are "born" in Israel. They are either:

  1. become developers during their service in the IDF - no Rails there.
  2. become developers after a relevant academic degree - AFAIK, no Rails there either.
  3. become developers in different ways, most of those would try and learn technologies which are required by the market. The remaining few that would bother learning Rails (or Django) are probably those who also read this blog.
I think that in the US market, especially in the Silicon Valley, this is not the case. Developers there are educated differently and are much more likely to be exposed to Rails. The only Rails developer I know - learned it while working in the Valley.

Here's another one for you: how many Israeli web-hosting companies do you know that supports Rails? How many for PHP/Java/.NET?
So, even if I'd try and develop a Rails application for the local market, I'd have to host it abroad, which is a shame.

A while back I did a short survey regarding the buzz around Rails development and other web frameworks. Check out the replies. How many chose Rails?

Finally, I must admit that I'm no better. I had a chance to choose Rails recently, but didn't. Sorry, I couldn't find others whom I could hire if needed.

Monday, April 4, 2011

.NET MembershipProvider with MySQL

If you're a .NET developer (Mono or MS, doesn't matter) and an OSS enthusiast, then you're probably using the MembershipProvider provided by MySQL instead of the default MS provider for MS-SQL. The MySQL MembershipProvider comes bundled within the MySQL Connector for .NET.


In certain configurations, one can expect various bugs related to the MySQL Connector, especially with the latest version of MySQL Server and/or Windows and/or IIS. The most annoying thing about such bugs is that they don't introduce themselves on a development machine (different web-server, different OS, etc.).

My latest bug involved getting NULL for Membership.GetUser calls, even for logged in users. The bug  would occur inconsistently, which made stuff quite hard to debug.
The solution? simple - always use the latest version of the MySQL Connector.

This is why I always plan the first-time production deployment to take a few days. You can never tell what will go wrong.

Thursday, February 24, 2011

Nokia, What Went Wrong?

I've been using the Nokia N900 for a week now, and it made me wonder: how comes there are no more Maemo based devices out there, and how comes Nokia's CEO states they're standing on a burning platform?

The N900 hardware is great, yet nowadays it doesn't stand out. Other companies produce hardware with the same quality. It's the software that makes all the difference.
The Maemo platform should appeal to every nerd and every software developer, as it is based on Debian, and porting applications to it is so simple.
As a result, it is capable of running some truly amazing applications, such as Firefox (including addons) and games that were ported from the PC.

I've set up a dual boot with Android, so I could compare stuff, and access applications that aren't available for Maemo. And although there are quirks in the Android (NITDroid) port, it's successful in providing the full Android experience. And you know what? I don't use it. There's no point in booting into Android when everything can be easily done with Maemo, and sometimes even better (like having a full, real, browser).

The two apps I do miss, though, are Shazam and Waze, and I believe that had Nokia continued developing the Maemo platform, ports of those apps would've become available as well.

Some of the best things I find in the device are:
  • Integrated IM/VoIP with Skype/GTalk/MSN/FreeTelecom/Jabber/etc.
  • USB Host.
  • Really useful desktop gadgets, and not plain icons that represents apps.
  • DLNA.
  • apt-get.
  • A full, real, browser. Renders everything exactly the way the desktop Firefox does, including flash.
  • QWERTY keyboard.
and the list goes on...

So my question to Nokia: why did you stop developing this platform?

Sunday, February 6, 2011

Sometimes IE/FF renders fine, and Chrome doesn't

Twitter style post (125 characters, not including this header):

After two hours of head banging on a bug in my HTML/CSS being rendered differently in Chrome, it appears it was a Chrome bug.

Friday, January 14, 2011

JavaScript Implementation In Different Browsers

In Hebrew, when counting or describing objects, it matters whether the object is considered as male or female. A table is male, while a television is female. As far as I know, this rule applies to Russian and other languages as well.
What's nice about humans is that if they use the wrong form, like a female form for a table, people around them would still understand what they're talking about. Although some might think that the language is ruined. That's OK.

When it comes to programming languages, things are different. Computer languages are supposed to be considered as an exact science, thus, if one not using the syntax correctly, the code won't execute.

Or so we'd like to think.

Consider this loop in JavaScript:
var i = 0;
do {
i++;
} while(i<2);
alert("done:"+i);


As you might expect, it would popup an alert box with "done:2" as the message. This would work on any JavaScript implementation I'm aware of.
Now, let's make a tiny difference (like using the female form in Hebrew, which is only a bit different than the male form):
var i = 0;
do {
i++;
}; while(i<2);
alert("done:"+i);

What was changed? Notice the semicolon (;) before the "while" statement. Try this using your favorite browser. If you get "done:2" as before, I urge you to replace your favorite browser immediately.
This piece of code shouldn't work. It has a syntax error. The semicolon is "unexpected".

Internet Explorer ignores that, and the code works as before. Other browsers (Firefox, Chrome) would halt the script execution.

I'm willing to forgive when people don't follow the Hebrew syntax down to the last rule, but when it comes to code - I'm unforgiving. Moreover, I'm unforgiving to the guys that implemented a "fuzzy" interpreter for a programming languages. This is supposed to be an exact science.

Let me give you another example. In this case, I'm not sure with which implementation I agree:
alert([1, 2, 3, ].length);
alert([1, , 2, 3].length);

Firefox and Chrome would print "3" and then "4", while Internet Explorer would print "4" twice. Basically, each array has an "empty" (undefined) element, so their length is supposed to be the same. But it appears that Firefox and Chrome would drop that element if it is the last one in the array.