Sunday, December 28, 2008

Do You Know well in JavaScript?

How many of you know well about JavaScript? Basically JavaScript is not a language; it was a script, adopting the object-oriented concept. This could be great in nowadays since everyone are so concern about O-O concept. In reality, how many of you able to code it well. How many of you know how to code JavaScript in a right way? Let me guess, there is no one can do it well.

I have been assigned to work on a JavaScript project in last month. The code are even worst than your imagination. It is really hard to maintain the code. The linkages of each JavaScript files are like a spider web. Who's fault? Planning error?

Come on. Every developer has the responsibility to write a good code. Not to show off their “technical” knowledge by combining the code into one line. This is irresponsibility as he/she is creating trouble to their fellow co-worker. Or this could be the limited knowledge in programming skills? May be we all need a proper way of training to write code?

Google around you will see there is actually a right of coding in JavaScript. Some more there are design pattern for JavaScript. No joke. I even go find out the design specification of JavaScript. I am not a script developer, and not even a web developer, I was a C developer since my first job. I don't like to be script developer as this language is not challenge enough, but now this scripting language is more and more attracting me. It is because scripting language is more concern about the design and implementation. Whereas C programming is concern about memory issues and optimization.

Saturday, December 27, 2008

Something was missing in Web Browser

UrgghhHHH~

I have installed firefox and flash player plugin, I notice that there were two things are not working in my Linux.

1) Some of the website couldn't show up the picture correctly. eg. youtube.com and amazon.com.

Is this a JavaScript error? Or Internet connection problem?

2) There is no chinese input.

The chinese language was not install in my machine, and also don know whether there is a simple way of input chinese text. eg. Han-Yu-Pin-Ying.

Saturday, December 20, 2008

Master Degree Plan

I was planing to continue my Master degree in next year. I have been thinking for this for quite a number of years. Do I really need this? Due to my passion of learning, and I don't want to waste my time on those self research study, I have make a decision to go for Master degree.

MMU is currently offer a Master of Comp. Sc. in Software Engineering and Software Architecture.

Here are the subjects list:

Core Course

* Methods in Software Engineering
* Architecture of Large Software Systems
* Software Requirements Engineering
* Low-Level Design of Software
* Software Quality Assurance and Testing
* Software Project Management
* Service Oriented Architecture Using Web Services

Elective Course

* Software Engineering Approach to Human Computer Interaction
* Security in Computing
* Real Time Systems
* Advanced Topics in Software Engineering and Software Architecture
* Risk Management for Software Intensive Projects
* An Agent Approach to Computational Intelligence
* Component-Based Systems
* IT Research Method
* Seminar in Software Engineering & Architecture Practices

University Subject

* Cyberpreneurship and Technology Business Strategy

Project

* MCS Project

Meanwhile, Maharishi University of Management is rolling out their Master degree as well. Here is the quick link regarding on the program

Here are the subject list:

Standard Core Courses

* Modern Programming Practices
* Database Management Systems
* Software Engineering
* Computer Communication Networks
* Operating Systems
* Advanced Programming Languages
* Science of Creative Intelligence

Other MSCS Courses

* Fundamentals of Algorithms
* Compiler Construction
* Artificial Intelligence
* Distributed Computing
* Advanced Computer Architecture
* Forest Academy
* Practicum in Software Development

Professional Seminars cover such subjects as

* Object-Oriented Programming Environments
* Object-Oriented System Analysis and Design
* Data Compression
* Logic and Temporal Programming

Basically I am not trying to compare which is the best, but I just want to know what I will gain from the programmes. According to an article I have read in the pass few weeks, there are 3 reason for you to go for this degree.

1. Bachelor degree are everywhere, you may want to get a higher degree in order to compete with them.
2. Your parents want you to complete this degree.
3. That was your interest. You really have strong interest in studying that particular course.

I had chosen number 3 without thinking anything because I enjoy in learning, explore and research.

Saturday, November 29, 2008

New plan for 2009

I have make a decision not to developing the UML tool as I found out that this is worth nothing and does not bring any benefit to me. Why do I need to create the thing again when it is already in the market? What for? Just for my own fun. This is true. I am really have great passion in programming. It seems so stupid to me because no matter how hard I do and how much effort I put on it, it just for my glory. From now on, I will never wasting my time to create such thing anymore. I want to have an objective and result. Not a never ending task in coding a program, I will never finish in creating those program as there are many many more program I have to do.

Do it when it need... Don't waste time... I should spend more time in personal development...

Sunday, July 20, 2008

The Script Manager

I have created a Script manager for managing the script command for my UML tool. It is a Singleton as there is only 1 script manager in the application. The responsibility for this manager is to manage the script command enters from input and then digest the command to know what it suppose to do. After that it’ll instruct Paint manager to draw out the diagram. For now this manager is able to accept command from input but it doesn’t know which diagram to be draw on the board as the communication between Script manager and Paint manager haven setup yet.

Saturday, July 12, 2008

UML Tool -> Diagram Manager

This project supposes to be short and fun, but it end up hard and sophisticate. Creating a UML Tool is not that easy actually. There are many design issue like the tedious one – UML syntax need to be determined carefully. Besides that I was choosing Win32 as my development platform. I wonder whether I have chosen the right technology to do it. This should be a rapid development and I suppose to use .Net or MFC to speed up my development. Since I already know MFC, thus I can concentrate on researching.Net.

My first view on .Net was not that hard actually. There (Microsoft) have new changes on syntax or probably the whole C++ was change. I also notice that I am not using MFC in the UI development. Is that Win32 programming II? And also it is a problematic to dealing with native code in .Net. Microsoft has changed the development style. Finally I have given up using the wizard to generate the GUI code for me instead I do it manually.

Now I have done with technical issue. Here is the new plan for the project. I will change the title to Diagram Manager because the objective of this program only focuses on class diagram instead of the entire UML diagram. The reason is I use UML class diagram most often. The reason to name it as ‘diagram’ is it is not just only draw class diagram. May be it will draw other diagram in the future, such as data flow.

Since I have narrow down my design, I can concentrate on 1 part and do it well.

Sunday, June 15, 2008

New Plan – UML TOOL

I got a new plan. After the Search Program, UML tool will be my next project. This project was started since two weeks ago. My initial plan was using C# to create it, but due to the limitation of my C# skill (as I don’t know C#), thus I will use C++ and will be make use of GDI+ in this project.

The idea was this. The program will be a command base program where it wouldn’t accept any mouse input. There will be a main screen locate at top of the window which is going to renders the object on the screen. This screen will gonna occupied 90% of the window. Whereas at the bottom of the screen will be a place for me to type the command. And those commands will instruct how the object should be render in main screen.

The estimate time for this project will be 12 days. 1st draft for this project is to have some rectangle drawing on the screen and some line that link them together. Beside that there will be some AI for the line where it will change direction if there are some rectangles blocking the line in between the link. Cool huh?

In this week, I have done some research study on the GDI+ and I feel OK with it. Next week will start to working on the 1st draft.

Saturday, June 7, 2008

Alternate Solution To My Search Program

Found an alternative way that will do the same thing that my program do. By using find command in Linux, U still can print out a list of search result into a file. If U are using Windows, try to get a copy of Cygwin, U will get the Linux command too.

Usage:
find My_Path >> Desired_output

eg:
find C:\Test >> test.txt

Output:
c:\test
c:\test\a.txt
c:\test\b.cpp

Disadvantage:
print out unwanted directory name, like c:\test.

Conclusion:
Need to figure it out how can I make a filter on the unwanted 'thing'.

Sunday, May 18, 2008

Trick to track the argument in console

On last week, I was working so hard to put in three features for the search program.

FEATURE LIST:

- Search path. This feature allows dynamically to search the desired path
- List. This is to show out the search result.
- Output. Export search result to text file.

The first two already done. Third feature still in progress.

During this experience project, I found a very interesting issue. How to track the input passing in through the command line? Lets take a look:

void main(int argc, char *argv[], char *envp[])

Initially I was using argc to track how many command was passing in. This is not really a good method of doing this because when passing in more and more options, it duplicate the same task. Refer to the code below:

switch(argc)
{
case 1: // no option was pass in
break;

case 2: // 1st option was pass in
break;

case 3: // 1st and 2nd option was pass in
break;

...
...

case n: // until n number of option was pass in
break;
}

Anyhow I have overcome this issue by tracking down the number of command passing in by using the argv pointer array. If argv[1] is empty, definitely I know that option number 1 is not there. Otherwise there must be an option passing in. For doing that, I just need a while loop to track every element in argv. But how do I know how many option was passing in? By using NULL checker? Actually I was using argc to get the total element in argv. I get this inspiration from MSDN.

Sunday, May 4, 2008

My first day in C++ .Net.

The first application that adopts this technology is my search file console program. The objective of this program is to retrieve all the files by searching through the particular location (including the remote media and network media).

I am having trouble at the first run. I mean every time I start something new, I’ll create a simple “Hello World” program to make sure everything are in place. “Something new” means this my first time in .Net development. The compiler that I am using is Express Edition 2005. At first I create an empty project from the general category. When I build the program by choosing “Start without Debugging” option, everything went fine. But it will prompt a message if I build using “Start Debugging” option.

The contents of the message are as below:

Debugging information for 'XXX.exe' cannot be found or does not match. Binary was not build with debug information.

This is not an error I guess, it just unable to retrieve the debug information. I do not know how to solve this problem, if you read this post and have any suggestion on this, do let me know. Thus I have to recreate the project by choosing “Win32 Console Application” under the Win32 category.

Now, the primary keys to deal with Files are DirectoryInfo, FileSystemInfo, and FileAttributes. The sample below will show all the files (not directory) in C drive.

DirectoryInfo ^di = gcnew DirectoryInfo("C:\\");

for each(FileSystemInfo ^fsi in di->GetFileSystemInfos())
{

if(fsi->Attributes != FileAttributes::Directory)
{
Console::WriteLine(fsi->Name);
}
}