Saturday, August 28, 2010

Google - You aren't always correct!

0 comments
I'm terribly disturbed today with some annoying Google attitude.

Google is our good old friend. No doubt of that. But yet, I think it is over confident sometimes.

Okay, here's the story. There's a Android powered Sony Ericsson Xperia X10 which was bought only a couple of weeks back for a good $400+ but is already a brick. I cannot repair it either with Sony Ericsson Update Service nor with Sony Ericsson PC Companion. I have been doing some research on how to unbrick it and tried various different ways to unbrick it with no success. I had 100's of tabs open in my browser and at least 90% of them were important tabs. Then I thought may be I should talk to Sony Ericsson customer service in USA so I got the number and decided to make the call with google voice. Though I had google voice in mac, I was working on windows so i had to download it again.

Once downloaded, it prompted me with this dialog box.



It's true that I'm living in Bangladesh. But how the hell am I supposed to read Bengali? I can hardly speak Bengali and I don't even know numbers in Bengali so you know the rest.

So I was confused, and then I did a tak-tik-tuk and pressed the nice blue first button. And the next moment, without a warning, my browser was closed and it was restarted with 0 open tabs :( I guess that's what this message box was all about. (and no, there was no clear way to choose any english installer)..

Google does good things.. But Google deciding if we can read some language? I'm not at all comfortable with the idea.. 

Google - Next time if you are putting some language bundle into an installer, ship English language bundle as well (and an option to select the language). Please? Thanks.

Cheers!
Roshan Amadoru

Friday, August 27, 2010

Ignoring the Ignorance - HTML/JS/CSS/Photoshop

2 comments
I'm a programmer.

Well.. That describes inner me.. It doesn't 100% describe my day-to-day work because now I have to do lot of things around the clock related to my business, but yet my passion is still there in programming, and I code something every time I have a chance and a need.. 

Through out the 10 years of my life in software field, I never bothered to design a simple web page (oh well.. except for some dumb web pages which I had to do to get credits for my degree).. It's true that I have fixed some of css and java script issues in some of the projects.. But I never designed one.. The simplest reason being that I didn't know much of HTML/JS/CSS/Photoshop stuff.. 

Not trying to boast myself but I can manage programming in Java / .Net / Objective - C/ RoR / PHP / Flex and even the ancient languages like Basic / FoxPro / Pascal.. But when it comes to HTML/JS/CSS stuffs, I start shivering.. And then starts sweating and my heart fills up with this weird feeling that I would wet myself in fear for web designing.. For some reason, I never understood those web designing things and I never thought of learning them too.. It's weird.. But it's true.. It's like I have been taught somet lesson by some terrible teacher and now I never feels like attending to any lesson on that subject anymore (reminds me some of my school teachers).. 


HTML/JS/CSS never felt right for me.. But whenever I talk with someone about web designing stuffs, they always talks like that's something pretty cool, sexy and easy to learn thing.. In short this is what they show me in different terms.. Sexy and easy going..

Web Designing as others described it

But no matter how hard they tried to convince, this is what I always saw in it.

Web Designing as I saw it

However, yesterday I got up on the wrong side of the bed... I got up early in the morning at around 12.30 noon.. And then I had a feeling.. I wanted to learn something new.. I wanted to design a website..

I had no clue where to start.. Started with our good old friend.. Google.. Browsed through some of the websites.. Studied their designs.. Opened up TextMate.. Started coding HTML/JS/CSS and little bit of JQuery.. Opened up Photoshop and designed buttons and backgrounds (I took some time to study how photoshop works though. Was not easy to learn like MS Paint :D)... Took some stock photo and used it in a banner.. 

And that's what I have been doing during last 24 hours.. And during that period, I've designed a new website.. And I have to say, the site I just finished designing looks far more better.. And that's also completed within a day.. And checked it against W3C validators and viola! it's XHTML1.0 Strict compliant and CSS3 compliant (except for a couple of warnings which I fixed later)..

And now.. After Ignoring the Ignorance, Web Designing looks sooooo sexy for me.. Just like this...

Web Designing as I see it now...
Anyway, she (megan fox) is sexy, isn't she? 


Cheers!
Roshan Amadoru

p.s. now all the web designing folks out there.. you better watch out.. because a new player is in the field :D

p.s.s. did you really think i will stop programming stuffs in favor to web designing? really?? :S No comments.

Wednesday, August 25, 2010

Redmine on Linux

0 comments
Hey Everyone,

So today, I'm writing something I did today.. Nothing fancy.. Just a little bit of technical stuffs..

As some of you may have noticed on twitter, I have migrated all my corporate project management tasks to the open source project management tool called 'RedMine'. Though it's been about 2-3 weeks since we have been using it, all this time we were running it on the port 3000 (because redmine is written in ruby and its now running on the Thin server and 3000 is the default port for thin server :)). I was laaaazy to integrate the thin server with the existing apache server, so i let it stay the default way. However yesterday I thought that I should re-config this, and I thought it would be best to have this project management tool running on a sub domain of my domain. Since my domain name is controlled by .lk domain registry (www.nic.lk) I wrote to them asking to add a new sub domain to the DNS. However, unfortunately they have responded to me saying that I already have 3 resource URLs mapped (2-A Records and 1-CNAME Record) and that's the maximum they can allocate per a domain name. They informed me that I will have to drop an existing record to have this new record in the DNS. I have no clue why they are using such a small limit. But anyway, now that's not an option.

So I thought may be I can use something like www.mydomain.com.lk in the domain name since i have bought those second level domains for my domain as well. But then for some reason I didn't like it.

Then I thought "May be I should map the thin server to a virtual directory of apache like www.mydomain.com/manager". And then... The experiment begins..

One thing I should confess here now is that I am not a Linux power user. I'm only a standard linux user. So I had to spend about 30 minutes on this to figure out how to do this.

So, my first question was, how can I map a virtual directory in apache to a different server.. Then comes to my mind the most awesome "mod_proxy" apache module.. I have worked with mod proxy only once before and I had very vague understanding of how to configure it.. But apache httpd documentation clearly saved me :)

Here's my encounter.

1. Enable mod proxy

Running "a2enmod proxy" command on ubuntu did the trick.

2. Adding proxy routing to the Virtual Host configuration

Opened up the webmin conf file in /etc/apache2/sites-available/ folder and added proxy details.

<VirtualHost *:80>
DocumentRoot /var/www/mydomain/
ServerName www.mydomain.lk
ServerAlias mydomain.lk
CustomLog /var/log/mydomain_log combined
Options -Indexes

#Following lines have been added
ProxyPass /manager/ http://localhost:3000/
ProxyPassReverse /manager/ http://localhost:3000/
</VirtualHost>

3. Visit www.mydomain.lk/manager ...

Nope.. Not working as expected.. I am getting an access restricted message from apache..

4. Allowing proxy requests from my domain
Now curious me went to /etc/apache2/mods-enabled/ directory and checked for a config file for mod_proxy. and yeah!!! There it is... proxy.conf.. Opened it up, and there I find some configurations.

ProxyRequests Off
<Proxy *>
AddDefaultCharset off
Order deny,allow
#Deny from all
#Allow from .example.com
</Proxy>

So I changed it to

ProxyRequests Off
<Proxy *>
AddDefaultCharset off
Order deny,allow
#Deny from all
Allow from .mydomain.lk
</Proxy>

and saved.

* Now all of you who is going to try this should make sure that you keep ProxyRequests off in order to prevent spammers from using your server.

5. Visit www.mydomain.lk/manager again..

Nope.. Not yet.. Now it is giving me an internal server error.. It is saying proxying to the requested protocol might not have been properly configured. What the heck.. Went to the mod_proxy documentation and realized I need to enable http proxy module.

6. Enable mod_proxy_http

Just running "a2enmod proxy_http" did the trick.

7. Visit www.mydomain.lk/manager again..

Awesome!! Page loads nicely.. But... Images are not loading in redmine :S.. Now what?
went to the redmine documentation and figured out that I have to do a small configuration change.

8. Adding relative url root to redmine.

Add following line

Redmine::Utils::relative_url_root = "/manager"

at the end of config/environment.rb file of redmine.

9. Visit www.mydomain.lk/manager again..

Awesome^2!!! It works!!!

10. Block traffic to port 3000

Now everything is fine, I thought I should block traffic to the port 3000.
But yet, I need to be able to access it from within my server because otherwise who the hell am i supposed to get access to redmine :D

So I've added a rule to my server's iptable.

iptables -A INPUT -j DROP -p tcp --destination-port 3000 -i eth1

(here, eth1 should be changed to whatever your network interface is)

and yeah.. I am done!!!

11. For the safe side, visit www.mydomain.lk

woah!!! Everything is fine and port 3000 is blocked..

** now for those of you who wants to remove the iptable rule simply run

iptables -D INPUT -j DROP -p tcp --destination-port 3000 -i eth1

and you should be fine.



Yeah.. so that's it!! and that's it for today :).. I've got work to do now..

Non-Alcoholic Cheers!!
Roshan Amadoru

Monday, August 9, 2010

Breaking News: Sri Lankans are Prohibited from Developing Applications for Palm

0 comments
Some of you guys might know that these days Palm hot apps developer competition is underway and I kinda thought of putting an entry and thought of getting myself registered as a Palm Application developer. So I did the initial registration form and proceed to the second step of the registration in where you have to select the country of yours. I have looked for Sri Lanka on the list but i couldn't find it at the first glance. So i went through the entire country list top to bottom just to realize that Sri Lanka is not in the list. I have been following up with Palm customer support ever since and to my horror, I was informed that Sri Lankans are not supported to get registered in the Palm developer program. This is a response from them.

"We don’t support registration from your country at this time, and unfortunately, I don’t have a good workaround for that, so I don’t know what to suggest.

This is something that we’re evaluating and may change in the future, but at this point, I don’t have a timeframe when it may happen.

Sorry."
In a subsequent mail, this is what I was told.

"It’s an issue with our interfacing with tax authorities in the various countries. It’s something we’re reviewing and it might change at some point, but at this point, we have no way to support Sri Lanka in the system."

This is very confusing. Because almost every other online competition in this world supports Sri Lanka for the registration and I wonder how only Palm has this issue. Is Sri Lanka banned from being participated in International Competitions? Have they misunderstood that Sri Lanka is a part of Iraq or something ? This is bloody confusing!! They should consider stop dealing HP and Palm products in Sri Lanka in this case. Screw you HP and Palm!!!

- Roshan Amadoru

Friday, July 30, 2010

AppStore Battle... Who's Winning?

0 comments
I'm pretty sure a lot of you are familiar with the term "app store" specially in the context of mobile applications... Though there are app stores like the LiveScribe Store, SplunkBase, for today's topic lets just focus on mobile phone market...

As per my knowledge, this whole thing with mobile app stores started when apple opened up their iTunes app store in july 2008, exactly 2 years back.. Since then other mobile phone venders started moving into the concept of "app store" because everyone saw the potential behind the app store.. Now most of the leading venders are in the battle of appstore, i kinda thought of gathering some statistics to get an idea of where they stand in terms of the number of apps in their app store. Here's my finding which I believe to be almost correct. Note that these are rough figures and rounded up.

iTunes App Store - 250,000 Apps
Android Market - 70,000 Apps
BlackBerry App World - 2000 Apps
Windows Marketplace for Mobile - 1000 Apps
Vodaphone Apps Shop - 62 Apps
Samsung **BADA** App Store - 60 Apps
Nokia Ovi Store - ???? (I couldn't find the statistics anywhere but i'm sure there are hundreds of apps in it because it records a download rate of 22 apps per every second world wide)

So clearly with the head start of 1 year, apple is without no doubt the top in this battle with android being the runners up. And clearly there is no other close rival to these two market places.. At least for some few years..

Nokia Ovi should certainly be the most widely used app store in the world due to the number of Nokia hand held devices being sold around the world, but for some strange reason Ovi store has not attracted many app developers..

So if you are stepping into the app development market for mobile devices, all I have to say is it's always better to start with iPhone and Android..

Cheers!
-Roshan Amadoru

P.S. On a side note - All you developers can take part in Samsung Bada developer challenge which is underway and win prices :) Bring some prices to Sri Lanka :)

Tuesday, July 27, 2010

How Nasty Do You Really Think ASP.Net Can Be?

5 comments
Hey folks,

Well.. Yesterday's concern is finally solved.. I've decided to go ahead with J2EE stack as I found it's kinda promising.. Thanks for the IM feedback guys.. (The guys who gave feedback knows who i'm referring to :))

Well.. Today's post might sound kinda offensive for some hard working ASP.Net Gurus.. But really, there are number of times that I have realized how sucky language ASP.Net is... I've kinda been doing some hardcore development of some plugins for DotNetNuke CMS portal for some specific need.. Today I have been banging my head on the wall for several hours because I've been going on loops with one nasty issue I came up with... I've been doing this implementation with Linq-To-SQL, because everyone talks big about it and for me also it was kinda promising solution at the first glance... I've been getting some weird error with the following linq data source ..

<asp:LinqDataSource ID="LinqDataSourceImages" runat="server" ContextTypeName="MINews.MINewsDataContext"
    TableName="MINewsItemImages" OnSelecting="LinqDataSourceImages_Selecting"
    EnableDelete="True" EnableInsert="True" EnableUpdate="True"
    OnSelected="LinqDataSourceImages_Selected"
    Where="GUID== @GUID && MINewsItemId == @MINewsItemId && Deleted == @Deleted && NewDeleted == @NewDeleted">
    <whereparameters>
        <asp:parameter name="GUID" type="String">
        <asp:parameter name="MINewsItemId" type="Int32">
        <asp:parameter defaultvalue="false" name="Deleted" type="Boolean">
        <asp:parameter defaultvalue="false" name="NewDeleted" type="Boolean">
    </whereparameters>
</asp:LinqDataSource>


I was dead sure there is no problem with the datasource (Well mind you I didnt rely on the datasource configuration wizard for this one), and I was convinced there is nothing wrong with the event codes I've written... But yet, I was keep getting this weird error over and over again..

After couple of hours wasting on this trying to analyze the code lines one after the other, some weird feeling struck my head and I went back to the database and changed a little thing..

If you know Linq to SQL, from above code you can obviously tell that there is a field named "GUID" in my table... Well I went back to the db and changed the field name in the db and then came back to the dbml file and re - generated the context file..

Bingo!!!

Just changing the db field name from GUID to something else just made the error correct..

Hey!!! Since when microsoft started deciding on the field names that we should be using the database ? This is a shame.. This may be just one occurrence of hundreds I haven't unveiled. I just wasted more than half of my day simply because someone at Microsoft thought they shouldn't let the app work properly if the field name is "GUID".. Damn you IDIOT!!!!

Cheers
Roshan Amadoru

Monday, July 26, 2010

J2EE vs Ruby-On-Rails!!! What do you think?

1 comments
Hello World!

So as most of you already know, I'm terrible at blogging.. This is the first blog after more than a year.. yeah :D I've had a kinda creepy time.. and yeah that's about it..

So, since I left my awesome job at Zone24x7 (www.zone24x7.com) couple of months after my last blog post, I have ended up doing something of my own after a very desperate-short term (4 month) career as a project manager for some small software firm which I thought who had a great potential, which I indeed miscalculated.

So Since then I've been doing couple of stuffs.. I screwed a lot.. But you never know whether you succeed or fail until you try things out.. And now I'm better well aware what things can go wrong and I believe I have a good vision now on how to make things NOT wrong :)

So I've kinda been working on an ERP (Enterprise Resource Planning) system together with someone who just quit very recently due to some personal matters, so now I'm kinda on my own. So I guess it's my time to re-think through the system and do a proper re-design of the system.

I've always been a Java enthusiast.. (But that's not the only place where my passion lies in programming..) I have had a great experience playing around with various aspects and frameworks of Java/J2EE over the years... I can just say i'm pretty much good at all those J2EE Hibernate / Spring / ActiveMQ / Tiles / etc etc, on different platforms like websphere, jboss, tomcat,... (No I have never played with glassfish.. i know i should :) )

Though I never really had the chance to do much of a Ruby-On-Rails stuffs, last couple of days i've been seriously considering to re-do the ERP's backend to be a RoR backend rather than the existing J2EE stack with hibernate/spring/ehcache/jersey/jsersey-json bindings/Quartz/mysql etc. (Oh yeah MySQL.. why not? - Its proven to handle much larger record sets though we get limited functionality than other sophisticated DBMS's like Oracle or DB2)... I kinda like the agility gives by R0R.. But at the same time, I like the strong set of components and the strong community around java and the surrounding frameworks.. But now I'm running low in the number of developers to work on this product, I sometimes feel RoR with ActiveRecords would be a better option than having to bang the head on the desk sometimes with J2EE.

Whatdddddaaaayaaaaaaaaallllllll think??? I can seriously use some help here to make a decision :).

Cheers All!!!
-Roshan Amadoru