NY Times dreams about broadband in US

I couldn’t stop laughing reading article in NY Times about how US is first in the world in broadband, contrary to what all of us who are trying to use it know. It isn’t last of course but first it surely isn’t. Forget South Korea, Japan, France, Netherlands and many others, what they have is nothing compared to what we have here. Right :) . And then you wake up.

There is surge of articles in printed media that are totally detached from reality, maybe they always did that (most likely) just that because we are now better informed we can spot them more easily. Like the one that proclaimed as most succesful startup that failed search engine that was founded by ex-Google guys (can’t remember the name), in Business Week.

I think printed media should die, short and quick death as far as I am concerned. I do enjoy reading Chicago Tribune in printed form, as well as numerous other publications, however those big news outlets are simply flawed beyond repair and I believe this is fundamental flaw that enables outrageous lies to be reported as news over  and over again. Now they can say that bloggers are not professional and can be manipulated, and this is true of course, but what they are doing is creating false reality and thank God for Internets as that their time is coming to an end.

What US is still leader is innovation and Internet is fantastic vehicle for innovation, however if intenet infrastructure is not among the best, it will slow innovation and business and other countries will overtake the lead. Not that that would be end of the world.

Rails on Windows, gems doesn’t install, can’t update

Let me first show you this:

C:\workspace>rails -v
Rails 2.3.0

(B*****s!)
(Me watching Diggnation one time too many)

So Rails or more precise gem installer sucks in Windows. Most of the time people have problem with sqlite gem but as it happens, others can make your life hard as well. Problem is that when specific Windows version of gem is not available, it tries to build one and this fails miserably. Now the real issue here is that it stops installing and updating other gems so you get stuck over some gem you barely use. Solution would be that those gems that can’t be installed get skipped and this small ruby script would do the trick (found it in ruby-forum.com after reading about it on Stack Overflow):

Create a file update-gems.rb and paste following (one line):

`gem.bat outdated`.split(/\n/).map{|z|z.scan(/^[^[:space:]]+/)}.flatten.each{|z| `gem.bat update #{z}`}

run it with

ruby update-gems.rb

and that is it, your problems solved.

rails sqlite problem in windows : no such file to load — sqlite3

Huh, what a time waster.

Rails used to work right out of the box. Not anymore.

I recently had hd crash and today I wanted to do some rails work.  No rails, no problem.

So I install it and try to use sqlite3, which I remember was trick to make it work, then I figure, maybe they fixed it by now. No luck.

So I try to google it, like last time, but this time there is no way out. I downloaded sqlite3, put it in ruby/bin folder, then in windows/system32 folder, everything works from command line, but not in rails. It took me quite a bit of search to find this post.

In the end here is what helped:

gem install sqlite3-ruby –version 1.2.3

Hopefully this will help someone else, or me, next time I search.

Writing full screen apps in VB.Net

I set out to write small desktop app for myself. Strangely there are very few resources or explanations online how to write full screen apps in VB.Net or any other .Net . It is not a game FYI but if someone would like to write one, he would want his game to be full-screen.

If this code proves any good (when finished) I might open-source it as well but this is not why I am posting this.

Main reason for my post is that explanations I found online are really confusing, I guess because it is very easy, no-one wrote about it and other people googling are finding only how it was done for VB6, for which you need to hook into user32.dll , still not overly complicated but total overkill comparing to this.

In order to get your app to full-screen mode, here is what you need to say:

   Me.MaximizeBox = False
   Me.MinimizeBox = False
   Me.FormBorderStyle = Windows.Forms.FormBorderStyle.None
   Me.WindowState = FormWindowState.Maximized

Now, let’s say you want to alternate between full-screen and normal, you would write:

    Sub SwitchStates()
        If Me.WindowState <> FormWindowState.Maximized Then
            Me.MaximizeBox = False
            Me.MinimizeBox = False
            Me.FormBorderStyle = Windows.Forms.FormBorderStyle.None
            Me.WindowState = FormWindowState.Maximized
        Else
            Me.MaximizeBox = True
            Me.MinimizeBox = True
            Me.FormBorderStyle = Windows.Forms.FormBorderStyle.Sizable
            Me.WindowState = FormWindowState.Normal
        End If
    End Sub

Let’s say now that you want to switch to full-screen when user presses F11 (I can’t be more obvious then this):

   If e.KeyValue = Keys.F11 Then
      SwitchStates()
   End If

You would of course tie this to KeyUp event.

All very simple things, the only reason for writing is that when I found confusing info on how to do those things.

Rails and Merb together in the future = R++

Rails and Merb projects decided to merge and create a powerful foundation for the future together, as of Rails 3.0 Merb will be integrated into the code and bring numerous benefits and performance improvements.

This is fantastic news for whole Ruby development ecosustem. Merging this two projects together and focusing efforts better will bring huge benefits but this is also one of those heartwarming things that people in Ruby community known for common sense approach decided that those projects have enough in common to be better off working together.

Most people read this news in total disbelief. I don’t think I read single negative reaction nor I would expect that there would be. This is awesome news and one more proof that Ruby people do things differently. I can’t wait to get my hands on Rails 3.

Merb gets merged into Rails 3!

I would like to congratulate both teams on important and fantastic decision.

Rails 2.2.2 introduce new mysql problems in Windows

I have two old rails 1.0 apps that I never updated. They are using fcgi which was fairly horrible way of running it and there is new passenger way, which is how it should have been from the start (why people like php, it just works). Anyway I decided to upgrade them totally with fresh rails as well as using passenger.

So I started to upgrade rails and it went fine. Then I tried to run them, I got:

no such file to load -- mysql

OK, this is easy to resolve:

gem install mysql

Right? Wrong :) ! It craps out, supposedly in installing docs, in reality it doesn’t install anything. And this is the real problem. It seems that gem for windows is faulty. The problem in my view is that you get error message that mysql.so is missing (which it does).

So I searched the net, same way you are now (as I suspect many people will get this problem) and here is simple solution:

Copy libmysql.dll from the MYSQL installation to ruby/bin.

That is it. Don’t think why and how, just do that and it will work and hopefully this situation will be remedied in the future.

BTW I’ve seen people revert to older rails versions after not being able to find ways to resolve this issue.

Phone changed, call us at 773-313-0670

We changed phone number. Yuhoo ! Old one is no longer functional and it was tied to VOIP service that was horrible. At times I questioned having a phone on which you can’t hear client properly. Since service didn’t improve and I found something better, we switched and are happy about it.

The service with ditched, we will not talk about them. The service we switched to is allvoi.com which is here in Chicago. So far, everything works and line is clear. I am very happy about it.

Getting productive

There is a new magazine on productivity, it is online only and you download it in PDF and print it or read it off the screen.

http://productivemagazine.com/

I bookmarked it few days ago but just got around to actually read it. No first issue should be without interview with David Allen of ‘Getting Things Done’ fame, so here it starts with him. To my surprise rest is also very good and I found quite a bit of interesting things to read.

Since I printed it, I found that format is also very convenient for reading, as articles span one or more pages, but don’t cross pages, so if you want to keep something, just keep those pages of the article. Also they can be rearranged if you like that. I find this extremely convenient, specially because I can toss rest and just keep the good stuff for reference later.

Right now I am busy adopting some of the practices I re-learned from the magazine (I kind of knew them but newer really applied them, so…).

Switching to Zoho

Zoho App Suite Rocks, Google Docs Sucks.

This is realization that I got after using Google Docs for quite a bit of time and after using Zoho for short while.

First and painful issue is that GDocs sheets after download are not compatible with Excel and formulas (very simple ones) don’t work. This is major issue to me.

Secondly, after using Zoho for just a brief period of time, I get a feeling that I can really use it for work and not worry over files. It is really well integrated, I am enjoying using it quite a bit, and pain and struggle to use it are rarely present. While I had to make myself use GDocs, I don’t feel any effort to use Zoho and learning just a little about it I was able to add Facebook, Del.icio.us, Twitter and Blog to apps. How cool is that.

Ubuntu 8.10 finally at my desktop

Huh. What a day. In the past I went through 3 machines and on this last one, this newest Ubuntu is the first one that would install and actually work. Reluctantly though. It didn’t really want to install, I have two graphics cards for two monitors, that confuses it enough that single one will not work.

I was getting ready to give up. I used ubuntu on laptop and this seems to be easier venue to install, however desktop was a pain to set up. I ended up using it in virtual machine mode, which does work. Using it like that I always feel like I am missing on something. After all, desktop machines are the ones that have power and I wanted to be able to have ubuntu here. I didn’t want to go into 1001 detail why it wouldn’t install at all (AMD machine) or would install but wouldn’t work in graphic mode.

In the end this is what I did because it looked I am almost there. After install I was dumped in text mode because it couldn’t figure out how to use graphics. Now that it works, it really works very nice, however second monitor is like second machine, I can’t move window there nor use it in any meaningful way.

So it finally works, once things are set, it is really pleasant experience. There are issues everywhere, sounds is barely heard even though I cranked everything up.

So now that , not quite everything works, but it works enough, I can say that I enjoy setting shortcuts. Multiple desktop environments are really nice. With installing Komodo Edit, I can do most of development here without too much sweat. Which is really nice.