Syntax Error

Recently I was working on a client’s project in C# with MS Access database. I usually don’t work on windows-only tools so it was somewhat of a learning experience. Anyways, while working on the project, we got stuck on a query.

It was an INSERT query which was running perfectly fine in Access, but when executed through C# it gave syntax error. Values were populating just fine, quotes were in right places but it continued to give syntax error, while copying it and running it in Access worked fine. After wasting couple of hours, we finally found out that problem was with fieldnames, apparently one of the fieldname was causing some problem, and we had to enclose each field name in square brackets [] to make them work.

So, if you are stuck in such a situation, try enclosing fieldnames in square brackets, actually it is usually considered a good practice to always enclose fieldnames in square brackets in MS Access queries.

Posted in General | Tagged , , | Leave a comment

Us, And Our Projects

No, I am not talking about United States nor Us magazine, just talking about us. We have a kind of a group here, consisting of few friends (technically, we are a set of brothers, friends, friends of brothers and brothers of friends). I am calling it kind of a group because we have never formally considered ourselves a group, our interests are different, we usually don’t agree on pretty much everything, including what to work on and how, and usually all (actual) work is done individually or by a group of at-most 2 people (others are always present to point out mistakes and sometimes to give moral support), but whatever work any of us do, it is pretty much always considered ‘our’ work.

Currently we have 7 running websites (including 4 blogs and a photoblog), with 2-3 ideas  currently in development, some of these projects were started on experimental basis and are on a back burner right now, while others are actively worked on. Here is the list of our projects (in no particular order):

  1. Kirayadaar.com
  2. Eat ‘n Travel
  3. Politics Pakistan
  4. Optographer
  5. Carobaar
  6. Education Inn
  7. Majestic Islam

Let me know what you think about any of these websites. Any suggestions and feedback is most welcome.

Posted in General, Personal | 3 Comments

Test Post Using WordMobi

Just testing Wordmobi , a wordpress client for mobiles (s60), which supports:

  • Text formatting ( bold , italic etc.).
  • Categories.
  • Tags.
  • Comments.
  • Preview.
  • Images (either local or from url, with optional scaling).

Edit from web: Image upload failed (I didn’t get any error but it didn’t show up here), will try again later.

Edit 2: Another try at postung image:
22072009025.jpg

Posted in General | Tagged , , , | 4 Comments

Docky – Dock Bar For Linux

After searching for a long time for a good, beautiful, easy to configure dock for Linux that can also work without compositing effects, I had finally given up, when I found out that Gnome-Do, my favorite application launcher, is going to feature a dock in it’s next release. Today, I downloaded and installed PPA packages for Ubuntu and gave Gnome Do’s docky a try.

docky

Docky is basically a special theme of Gnome-do, to access it, you have to go in Gnome-Do Preferences -> Appearance and change it’s Theme to docky. As soon as you select docky, you will notice a huge dock bar appear at the bottom of your screen. By default it shows your most used applications. If you don’t like it’s size, just take your mouse pointer to it’s vertical border and it will change into resize pointer, you can then drag it away from screen border to increase the size, and towards the screen border to decrease the size.

Adding and removing icons from dock is as easy as dragging an item on the dock or dragging it away, depending on you are adding or removing. Another way to add applications to dock is search for them using Gnome-Do and press the small plus sign below it. You can also right click and remove applications from it.

Docky also replaces usual task bar, though it is bit lacking in this front for now, but it is to be expected, as it’s still alpha quality. Currently, docky doesn’t provide a way to access different windows of same application, that is, even if you have 6 firefox windows open, it will show them as one.

Docky can use all plugins for Gnome-do, though there aren’t any docky specific plugins available yet (like start menu, time, systray etc.), but I am sure community will start contributing soon enough. If you are looking for a nice dock yourself, give it a try, though beware it’s still in it’s alpha quality so you might experience some crashes or unexpected behaviour, if that’s the case you should wait for it’s final release.

Read more about docky at it’s gnome do wiki.

Posted in Linux | Tagged , , | 5 Comments

Officially Switching To Colemak

colemak_smallFew months ago, I wrote about different keyboard layouts and planned to switch to Colemak. I wasn’t able to completely switch, mainly because I am a programmer, and wasn’t able to give Colemak enough time. I tried it couple of times but postponed complete switching.

Couple of weeks ago I tried Colemak again, but this time I went cold turkey. The best way to start Colemak is to download typing lessons from it’s site and try first few lessons (they recommend going through first three lessons in one sitting). It helps get the hang of new layout.

Learning a new layout when you are already used to one is not very easy. Just as everyone had told me, first few days felt like walking thorough mud, my fingers were not able to type at the speed my mind and body was used to, it had that dream like effect where you are moving in slow-motion and can’t move fast no matter how hard you try. Don’t let me discourage you though, as that’s just for first few days, after that your fingers and mind start getting used to new layout and it becomes easier. My typing speed with Colemak is now almost equal to what it was QWERTY (though I make lots of typos at that speed, so, I go bit slower) and my speed and efficiency is still increasing.

It could be just a psychological effect but it feels my hands are less strained than how they were with QWERTY. Even though it’s a great layout and I will highly recommend it to everyone,  but switching layout is just not for everyone. There are many people who type by looking at the keys, it won’t help them much, similarly, those people who don’t type much, the incentive of learning new layout is very low for them. But anyone who is using QWERTY, types a lot, or have ever complained about RSI, should definitely give it a try.

Posted in General | Tagged , , | 5 Comments

Aqwaal 0.2 Release

Today I am releasing version 0.2 of Aqwaal.

At user’s end it looks pretty much same as 0.1 version, only big difference in this version is that now you can edit / delete author name, quote source and tags.

Though, now that basic structure is there, plan is to make version 0.3 actually usable for anyone who might want to install it. Which means creating a nice looking layout / theme, making infrastructure more secure and stable, adding basic search etc.

Visit Aqwaal project page to download the latest version (or click here for direct download). Any comments or feedback will be most welcome.

Posted in General | Tagged , | Leave a comment

Israel’s Strikes on Gaza [Cartoons]

Got this email today, with cartoons from Brazillian cartoonist condemning Israel’s attacks on Gaza. They aren’t recent but what they show is still happening.

Disclaimer: If you believe these images violate copyrights, please let me know.

image001

image002

Continue reading

Posted in General | Tagged , , , | Leave a comment

Aqwaal – Quotations Management System

Few days back, I uploaded a web based (PHP / MySQL) quotations database manager, Aqwaal. It was originally inspired by Quotations Page, I wanted to have a self-hosted version of similar software to keep track of my growing list of quotations, I found some software like Chirpy, but they were more suited to manage quotes from IRC. As these were my early days of programming, so, I decided to write my own, with the thought that it will also hone my skills, but soon got busy with other things and forgot about it. That is, until now.

Currently, it’s a very basic version, and is only released as a proof of concept (which means you are not supposed to use it for anything other than development or just to check it out). For now, at admin level, it only supports:

  • Add quote (including author name, tags and source of the quote – all optional)
  • Delete any quote
  • Change Admin user password

At end user-level:

  • Browse all quotes
  • Browse quotes using tags
  • Browse quotes using author name
  • Browse quotes using source
  • Very basic paging support

Interface is not very pretty right now, but it is easily usable. If you are a programmer and want to look at the source, let me warn you, as the code was written quite some time ago it too isn’t very pretty either. There are lot of things to be done, but I would prefer to make it stable with only basic features first and then go for all the fancy stuff.

My current aim is to add:

  • All basic functionality (edit quote, edit / delete author name, tags, sources etc.)
  • Search
  • Basic theme support (CSS at least)
  • User management (thinking about it, not sure yet)
  • And of course, remove all bugs

After that, it depends on whether anyone (other than me) is actually interested in it or not :)

Aqwaal Project Page: http://code.google.com/p/aqwaal
Discussion Group : http://groups.google.com/group/aqwaal

Posted in General | Tagged , , | Leave a comment

Edit File in OpenOffice.org

One of the great thing about Office software is, no matter how much you know about it, you can almost always find a feature you never knew existed. I am using OpenOffice.org for a very long time now (more than couple of years), though as my usage for office applications is quite low, I can be considered an average user for these applications.

Yesterday, while preparing for my exam, I was reading my handouts in OpenOffice Writer, when I noticed an “Edit File” button in toolbar, which I had never noticed before (though according to the screenshots I can see on web, it has been present since always). The button is used to switch between Edit and Read-only mode. If you are only reading a document and don’t want to edit it, switching to Read-only mode makes the experience more pleasent by removing formatting toolbars and improving overall page view.

Read-only Mode

Read-only Mode

Edit Mode

Edit file button can also be used to open a copy for editing, if you don’t have permissions to edit the file you are currently reading.

It’s not some huge feature, but if you read many documents / ebooks in OpenOffice.org, or want to edit a read-only file, it can be quite useful, and the fact that I (and few other people I know) didn’t know about such a simple feature made me write about it. It’s interesting how many people don’t know about most of the features present in such huge software. If you know any such feature which no one else seems to know, do share it with us! :)

Posted in General, Linux | Tagged | 1 Comment

Lahore Bloggers Meetup 2008

Yesterday I went to Lahore Bloggers Meetup, organized by Badar Khushnood, Google’s country consultant, IEEE Student branch of LUMS and CIO Pakistan.

Event started (I was 10 mins late, not sure if I missed something) with Badar Khushnood’s introduction to blogging and how to earn money from it. Main points of his presentation were:

  • Follow your passion
  • Find your audience
  • And earn money from it.

It was followed by success stories of 17 year old student Haris from Sizzledcore.com – told by Badar as Haris’ mother didn’t allow him to attend the meetup due to his exam next day – and Saad Hamid from Sizlopedia.com. Then came Maryam Nasim, a housewife earning from freelancing using her site PinkWool. Last hour was dedicated to Question and Answer session, which was pretty interesting as well as informative.

End results were, earning money from blogging takes lots of patience and hard work. Write original content, and follow your passion. If you work hard you will eventually start getting some results, but there is no shortcut. Most importantly, don’t write because you want to earn money, write because you love to.

In the end, I finally got to meet many people I already knew on web, some more thoroughly than others. It was great to finally meet them all.

This meetup is also covered (in more detail) by Sohaib Athar, UzEE, Imran Jafri and TechMynd (the most detailed roundup yet).

Posted in General, Personal | Tagged , , , , | 5 Comments