Monday, April 25, 2011

My Career Shift - II

Okay, I made a schedule for the next phase. It is about three months long, but I hope it is useful as I thought. The main objectives of this phase are:
  • Strengthen my knowledge of Python.
  • Learn and apply the basics of AI, so I can decide the following phase depending on the current one.

The schedule is as follows:
  • It starts from 1 May 2011.
  • OS to use is Ubuntu 11.04. Just a normal usage to get used to it, so whenever I have to use it technically, I don't start from scratch. And because I want to be be free of cracked applications.
  • 2-week course to revise the basics of Python and cover the main modules. [1:14 May]
  • 1-week project to apply what I learned. [15:21 May] [project not decided yet]
  • 8-week course to start AI from the beginning. I didn't go deep anyways, but this time with applying the examples using Python. [22May:16July]
  • Reading about Software Product Management will get in the queue with other general books I read.
  • I should not put in mind the targeted platform for my future applications. I can watch the market carefully. But choosing the platform is not part of the current phase.

I try to use only free resources ...

Choosing Python, not Ruby:

Learning Python:

Learning AI:
I haven't decided the best place to learn AI yet. But till now the NPTEL course was an average one. I still have some time to find better books/resources.

If you have comments/suggestions, you are more than welcomed.

    Sunday, April 24, 2011

    My Career Shift - I

    Ok, this post, or maybe more, is not about coding or applications but more about technology /knowledge and where can I go next in my life. Just thinking loudly.

    After graduation, less than a year ago, I decided to try new technologies until I get a job. But the job came fast enough, thank God, to get me into real life of software. I developed Qt applications and thought that Qt is coming to the top as a crossplatform framework (Windows / Linux / MacOS / Symbian / MeeGo), but suddenly Nokia dropped Symbian & MeeGo from its future main mobile phones, and maybe used in Linux tablets. Now Qt seems to be a promising framework but outside mobile applications. And since the current big bubble is the mobile applications bubble, I lost a big opportunity that could come from this framework.

    I forgot the plans of learning other technologies and now I have to pay more time and effort to compensate the lost months of nothing but Qt.

    What are my options?

    The best career is the one that I like and can give me a good life. So I can search for the intersection points between what I like and what technologies or career paths the market needs/provides.

    This is a shortened list of what came in my mind till now. I just listened to my mind and judged:

    • Artificial Intelligence
    • Game Development
    • Android
    • Tablets
    • Scripting (Python/Ruby)
    • Linux Systems Engineering
    • Software Product Management

    … These are the loudest sounds in my head, so what is better for my career shift?

    Artificial Intelligence:
    This is my biggest dream of all. Applications that evolve and change with their users, where every user has a different experience for the same application. I started to revise the basics of AI a couple of months ago, but stopped in the rush of life. So it is the field with the top priority right now.

    Game Development:
    This is a nice and amusing way to practice everything related to software development. I consider it the ultimate software product, where catchy ideas, AI, UX, performance meet. Also games have a great effect on the ideas and thoughts of a society, so it can be a powerful tool to spread certain ideas.

    Tablets & Android:
    As I said before, news is popping everyday about the increase of mobile & tablet applications. Browsing, reading, playing, chatting …etc. And what is more growing and popular than the Android OS and iOS? Mobiles and tablets are growing in specifications that the difference between them is decreasing to be a matter of physical size. And by looking at the application stores, the good application will somehow find its way with support of cheap marketing like the social networks. The Android OS seems a better choice as is it not adopting the concept of Apple -which I hate- about creating their own closed kingdom and all developers are peasants who follow all the instructions to get their applications accepted.

    Scripting (Python/Ruby):
    I’ve started to learn Python about a year ago, but not enough to call myself a good python programmer. Although it saved my day twice –as I can remember- and still doing, I didn’t give it a chance to get deeper in my life. The good and stylish opponent is Ruby. I found that it is a good choice with great power, especially when combined with Rails, and now it seems to be going for mobile apps too. After some search I decided that Python would still be a good choice with big number of APIs and communities, and don’t forget the Google support for Python.

    Linux Systems Engineering:
    Ok, this is really looks weird between all other topics. I’ve heard of it a few weeks ago, but it is neither suitable for me nor my very small experience. Let’s skip this and maybe think of it in the next phase of my life.

    Software Product Management:
    And this is another new topic I’ve heard about and found important and interesting. This is not coding but who said that software products are only about coding?

    .. So, these were the thoughts inside my mind. Now I have to decide a plan for the next few months of my life.

    Saturday, April 2, 2011

    Interfacing Parallel Port using Qt

    I've been in a situation today where I wanted a quick app to interact with the parallel port. Although it is no big deal, it was my first time. So I wanted to document it and make a simple application.

    There is no Qt API to access the parallel port, so there was no other way but using an extra DLL: inpout32.dll. The core of code in brief is like that:

    Note: the DLL was not available by default. So I downloaded it and Had the choice to put it in C:\Windows\System32 or just point to it in the application's folder.

    #include <windows.h>
    /* prototype (function typedef) for DLL function Inp32: */
    typedef short _stdcall (*inpfuncPtr)(short portaddr);
    typedef void _stdcall (*oupfuncPtr)(short portaddr, short datum);

        HINSTANCE hLib;
        inpfuncPtr inp32;
        oupfuncPtr oup32;
        short portData; //must be in hex
        int portNumber; //must be in hex

    /* Load the library */
    hLib = LoadLibraryA("inpout32.dll");
    /* get the address of the function */
    inp32 = (inpfuncPtr) GetProcAddress(hLib, "Inp32");
    oup32 = (oupfuncPtr) GetProcAddress(hLib, "Out32");
    Note: I faced an encoding error with LoadLibrary(). so I used LoadLibraryA() instead.

    portData = (inp32)(portNumber);

    (oup32)(portNumber, portData);

    A useful hint for converting from QString to Hex/Binary, and vise versa
    //QString to Hex
    portNumber = myString.toInt(&ok, 16);
    //Hex to QString
    myString = QString::number(portData, 16);

    Note: Icons in this application are free!

    Download source code
    Download executable

    Parallel Port Output On Windows XP using Qt4 and C++
    MinGW: char to WCHAR