The perfect browser

Posted in web with tags , on January 27, 2009 by Bartosz Radaczyński

Boy, are there many browsers out there. I’ve tried a lot, with all the different versions and all that. But here’s what it boils down to: neither is perfect. OK, granted the closest one would still be firefox, but after seeing chrome boot up twice as fast on the same machine and opera even faster, I’ve gotta tell you, this one is also flawed, and big time that is… But it seems, that (no including IE) every browser that I looked had some nice features. I love firefox’ extensions, Opera’s speed dial, Chrome for it’s ability to save the screen space and for its speed, Safari for a nice user interface and speed, Konqueror for integrating with my KDE (session saving when shutting down the computer). Will there ever be a perfect browser for me? Well, right now it’s still firefox, but some of the ideas from other browsers I has to import through extensions. But still, this KDE integration bothers me a little…

Heres’s a list of my currently used Firefox extensions (see, how many I have to use to get the browser to suit my needs?):

  • Adblock plus
  • Auto dial
  • download Statusbar
  • gmarks
  • locationbar
  • personal menu
  • tab mix plus
  • add’n’edit cookies
  • firebug

I specifically love the gmarks, personal menu and download statustbar for space-saving (uninstalled the google toolbar, removed menu and statusbars and now I have a lot larger viewport, though still smaller than in chrome). Hope that chrome for linux is coming out soon, but I would just love to see Firefox’s new javascript engine being even faster than chrome’s. It seems to me that chrome’s appearance has sped up the development of browsers and I’m just wondering how long Google is going to support financially two browsers (chrome and firefox), and what will come out of that. At the same time, if Konqueror’s also switching to Webkit as the default rendering engine, will Gmail and other google apps work flawlessly in Konqueror, finally?

Why don’t the managers get it?

Posted in Uncategorized on January 23, 2009 by Bartosz Radaczyński

Flow is the mental state of operation in which the person is fully immersed in what he or she is doing by a feeling of energized focus, full involvement, and success in the process of the activity.

Yeah, heard it all before, will you nerds stop whinig about your work conditions? Well, no and it is because of that state above. Have you ever wondered whether the managers get it at all? And why do they cram people into open space Dilbert-like cubicles? So, dear programmer, I have some bad news for ya – the wonderful, quiet, private, well-lit office is an almost unachievable dream. Here’s why. As Joel has once written, there are several (in his opinion 5) different worlds of software development. The largest part of the programming world are the in-house programmers (and this is by large factor, I suppose). Now, notice that fo the kinds of organizations that these people work for, they are not the “core business”, which basically means they are not something that the organization is living off. So, if they are not an asset, then… you guessed it. They are the cost, the burden of running the company. Which in turn means the software development departaments in these organizations have little voice and little power. Which directly translates into: the equipment quality (the developers are the last to get LCD monitors and nice chairs), the accomodation quality (usually an open space, probably in some old building, little to no daylight, no free cofee etc.). So, if you’re one of these Java or .NET or c++ monkeys doing some accounting system for a bank/insurance company/telecom/whatever, you’re doomed. Sorry. The fact is that out of all the worlds of software developoment, the only place that you can be trated nicely is when your work translates directly to company’s income. Which is shrinkwrap software (and/or commercial web-based software, which essentially is the same thing, just instead of having to deal with gazillion windows configurations you have to deal with 5 or 6 web browsers <ok, most of the sites test using 2 or 3 and it suffices>). But, I’ve heard war stories of shrinkwrap software companies, where the CEO held an all-hands meeting just to tell the people, that their salaries were the largest cost of running the company, and that it had to be reduces. I wander, why noone told the guy: it’s and investment not a cost goddamnit. Perhaps he came from some cable manufacturing company or a reail chain or something like that and had no clue about the software industry.

So, back to the title question. The managers do get it. At least some part of them do. And it’s not like they do not appreciate the fact that creating software is a highly creative excercise, but there is a reason for the programmers to be called “monkeys”, right? And the reason is that from some point up the hierarchy all these developers seem equally significant to the manager. Every one of them is just a unit of time, a head in a count, that for all they know can be replaced (with more or less effort). They do not matter as a single person, they only matter as a piece of the machine… Like on the assembly line. Like in Office Space. If that movie seems familiar, you’re in deep shit. Get a 5 year plan to land in a decent company that makes shrinkwrap software, cause that is where you can be treated nicely, or, alternatively – make a plan to start up your own.

How to make Gmail work in Konqueror (with chat window)

Posted in Uncategorized on January 21, 2009 by Bartosz Radaczyński

So, finally after quite a while I got to know, how to make gmail play nice with Konqueror. That still does not mean that it is perfect, but it is usable at least.

  1. get the webkit rendering for konqueror (I have it by default in Interpid repos)
  2. set the browser identification to Mozilla 1.7.3 (not Firefox, not Safari, mozilla 1.7.3 specifically)
  3. go to gmail and try it out

It seems to be working just fine at my station. There are of course issues with other sites 😦 (It seems that the text documents in google docs work decently as well. The spreadsheets do not, however).

Is there a way to make webkit the default rendering engine in konqueror?

Psycho x64, GIL

Posted in Uncategorized with tags , on December 19, 2008 by Bartosz Radaczyński

So why exactly is psycho not available for x64 architecture? Because it was meant to be incorporated into the pypy project…. Strange, since:

  1. pypy is twice as slow as cpyton is
  2. the main goal of the pypy project is not to provide a faster python implementation

Can anyone explain this to me? I’d really like to see some of the psycho improvements on my 64 bit machine.

Another thing – why the GIL? Is it on purpose to make some market room for jython with the native threads? Is there some other motivation behind that? Is it to force people to use processes (as the post and pythons 2.6 multiple processes model suggests). How are they better than threads? For me it seems that they do add more overhead of forking than threads ever do (I guess that is why they call them lightweigh processes). Is there some explanation for this phenomenon?

Things that you should learn at college

Posted in Uncategorized on December 15, 2008 by Bartosz Radaczyński

Ok, so this one goes out to all the sorry asses (like me) that were really clueless at the time of their college education not to take some of the appropriate education courses and feel like they miss some key points in their workshop. You can go ahead and think that once you have a nice job and all that it is not necessary anymore to learn new stuff, but I believe that equipping yourself with appropriate tools of the trade is really going to get you far. Anyhow, whatever language you are coding in there are several things that may come in handy one time or another. Of course the essential skills for a software developer are perhaps not among these, but still:

  1. Compilers. You really need to get this one – is will at least let you realize, that parsing stuff with regexes is not the best choice for many reasons. You do not have to invent your own language, mind you, just get the grasp of how the parsers work and perhaps implement just the parser (not the compiler). It’ll help you solve some problems that seem to be unrelated at the first glance
  2. Data structures and algorithms. This one is essential as well, since you should at least have a clue about the underlying mechanisms of hash tables, lists, trees and similar data structures. Also, some performance issues that you occasionaly run into come from these things.
  3. OO. OK, this may seem trivial – essentially every cs curriculum includes object orientation, doesn’t it? Yeah, but modelling things in terms of objects is not as easy as it seems (at least for some of the programmers that I have met on my way…)
  4. C course – well, this should have been a number 1 thing. Joel is right – some of the people just do not have the part of the brain that understands pointers. And if you can’t get that, you CANNOT be a good programmer (despite what Jeff Atwood says – he would probably get it anyway). This is not really a necessary skill now, since the modern languages abstract these kinds of things away from you, but it is a good test of your aptitude towards being a decent developer (ability to think on several levels of abstraction at the same time, ability to switch context etc). People that do not get pointers end up as managers 🙂
  5. Datatbases – no need to elaborate on that one.
  6. Shell scripting.
  7. Some busisess course, marketing and related issues. How many geeks have you met that cannot communicate with the outside world? This should also be a necessary skill for a developer. Autistic kids are really hard to work with… And this especially important in large organisations. You actually have to sell either yourself, your team or your work. It usually helps to comprehend what the developers call “the politics” and which it really is, but after learnign something about that stuff, you can at least somewhat understand why the “business people” do what they do.
  8. Typing – is this something that you can learn at college? Or perhaps in your spare time in college… That’s it! College time is when I really had time for this stuff. And sadly now I miss on typing a bit, but still trying to catch up with my skills (as with the rest of the list).

Do you have any thoughts on this?

Parsing and stuff

Posted in Uncategorized with tags , , on December 1, 2008 by Bartosz Radaczyński

So, for the past two weeks or so I’ve been trying to get this small python thingy up and running. But (as they always do) this “small thingy” suddenly turned into piles and piles of code. I guess that this is what they mean, when they make out rules like “when a programmer gives you an estimate, add 1 and take the unit immediately larger than the one given” (so that two weeks means actually three months).

So, anyway, this little project started off as a code analyser for cobol programs + db2 sql. It was meant to provide some sort of data flow analysis. I all seemed pretty straightforward and the idea of making that kind of analysis on 300 programs blew my mind, so I figured that an automated tool would do a much better job than I even would doing it by hand. I sort of wandered around to see what choices are there to make your own custom parsers in python. As it turns out there are at least two good ones there. The first one is called pyparsing. This is the one I started off with. But after carefully converting the COBOL grammar from EBNF to pyparsing model it turned out that parsing just one program took like forever to complete. On the other hand it turned out to work pretty well on the sql, but after a while I decided to throw that out and reimplement it… I know, worst idea ever, but still, I was not much of a time-constrained, so I could afford that. And mind you, I’ve thrown away roughly three days of work, so not much harm was done there.

On the second take to the parsing issue I thought that actually being able to write the grammar as EBNF, since these are really much more readable than the pyparsing representation and they are also easier to change. After all, we cs guys are used to math-like symbols… So, with the application od simpleparse things really took off now. It took me about 10 workdays to get the cobol grammar to parse, some 2 more days to add the db2 sql (maybe not complete, but good enough for the programs here). So, anyway, the main thing was, that simpleparse is really a simple parser thingy. It does not support maximum length/most successful match but the first match only. This is crucial to defining grammar, you’ve gotta make the grammar list the longest expression first. The main problem was in the relational conditions, which in COBOL make the form of

IF ABC=1 OR 2 OR 3  OR DEF <= 123 AND WS-SOME-VAR IS NOT GREATER THAN ‘ABC’

now this is really strange to parse, especially the abbreviated condition (ABC=1 OR 2 OR 3, which actually means ABC=1 OR ABC=2 OR ABC=3). But you can get by somehow – at least I did. Anyway, the performance increase is dramatical. On my dual-core laptop the pyparsing stuff took two days to parse a simple program! With simpleparse it takes several seconds… Well naturally this is due to the parser’s implementation being way simpler (first match cuts the further comparisons), but if you’re carefull enough this thingy is capable of doing soooooooo much!

So in the end I guess that Steve Yegge was rigth when telling to learn that stuff about compilers. It definitely pays off to be aware that it is easier to make a parser that use regexes… Or at least it seems so 😉

Free CS courses online

Posted in Uncategorized with tags on October 21, 2008 by Bartosz Radaczyński

I’ve just stumbled upon this really nice data structures and algorithms course. This is a really nice looking one. Does anyone have some other good online courses links?