Tag Archives: Software Development

iPhone development tools

Working with Iphone development is working with OSX, and we always need good tools and software for both IPhone and OSX environment to boost our productivity and reducing the repetitive, boring jobs

1/ Multitouch, Accelerometer and more : ISimulate

An application allows you to use your real iphone to control the IPhone Simulator. There is nothing better than the real IPhone device to get the real user feeling. The reason is that it will save a lot of time for you when you only build on simulator, debugging on simulator and you have a wide screen to see.

2/ Memory static analyzer : Clang

Help you a lot in the managed memory environment of iphone development. Good news is that the new XCode (3.2) will integrate directly with Clang help you to analyze and find memory leak much faster.

3/ Google tool box for Mac

You cannot write a good iphone app development without writing good unit testing. And I suggest you to use Google toolbox for Mac with a lot of supports, easy to integrate into your project. It is better than the default OCUnit in XCode. It also really runs your code, which takes more time, but gives you a real, better result and can help you to deal with some File IO or real code you need to run when running unit test.

4/ UI Automation Test: XCode Instrument

Stop running the UI everytime you fix a bug or adding new feature. UI Automation Instrument is a best tool for you like robot proxy in web testing.

5/ Screen capture software: Jing

Good, free software with high quality captured video. Good use for demo.

Catupre Screen Software

6/ Chat client: Adium or Imo

Why do I put a chat client here? Everybody need some way of communication, especially if some of your co-workers or clients are not there. In Mac, you can use Adium to integrate a lot of chatting services like Gmail, yahoo…

Open source and the openess

After learning and discussing to developers around me, I have some of my thoughts on open-source world and the more general one, the openness of the world. I will try to walk through some posts about this issue to discuss around those things. From now on, I will use open source software as a general term for open source software, library and framework. The viewpoint is quite based on start up environment.

What is open source?

Open source software is software that allows people to view the source code, to change, to modify or to link it (library, framework) with your software or system to build a new, bigger or better one.  It really depends on the license of the open source that I will list and discuss some of them later.

Open Source Users’ benefit?

In short, it can be quoted by Newton:”If I have seen further it is only by standing on the shoulders of giants” (http://www.cippic.ca/open-source/). Open source software development embraces this principle.

  • No buying cost => can try and fail then try another easily. (but it is not free, read the disadvantage part)
  • When there is an error, everybody knows and tells it out.
  • If you work with something really new, nobody else works on that before or no library reaching to the point that is acceptable to your application. You will know how much important it is to allow you to modify and extend a library. Famous companies will not take a big risk to go ahead in risky and new area to support you.
  • Can be already tested well by the huge community if there is a bug, people can find it already for you, already posted a patch for you.
  • Community Documentation is also a benefit when many people already asked and answered about the software.

Any risk or drawbacks?

  • Not all the open source software is good. Those open source software require a lot of testing from community. You may sometimes take a big risk yourself. My team already experienced some stupid bugs from an open source library. There is no 100% guarantee. If you buy some service/framework/library, you can sue them for the bad quality.
  • “Linux is free, if your time has no value” is correct no matter how you love Linux. You have to pay time for learning it, for testing the new library to make sure it runs like it is declared.
  • Many open source software is really bad at documentation. Some people create open source software just for fun, so they sometimes are not expert, not professional and not responsible enough to document it well.
  • The open source software can become out of date at sometime. When the authors start getting bored about their products and become too busy, they just don’t update it frequently. I have quite few experiences on open source software development, but I can see that all software need a leader, it can be an original author or can be any other people. It can be right that the whole community can contribute. However, if the software has no shared vision to grow or no people make sure that it keeps growing, it will become out of date soon

Licenses of Open Source

Now, I will move to the next part, which somebody may still misunderstand about it, the license. I will move from the most generous license to the strictest license. The license will really determine how we can use the open source software, varying from almost open like you can copy and redistribute it to really strict like you can only link to the library

Absolutely open, you can distribute, recreate, copy using whatever means you want.

Like public domain, but with a little bit more restriction: the name of its contributors is not allowed to be used to promote the software use the open source. Both of them have a little bit difference that you may want to read more yourself.

  • GNU GPL General Public License

This one is like BSD and Apache but it is stricter. If you modify the copy/copies or a portion of it, use it or distribute it, your program MUST BE under the GNU GPL.

It is GPL but with less strict. It means, if you modify the program, you still have to distribute your work under the same license. However, if you just use the open source program like a library (which means you link to it by source and compiled code), you are allowed to distribute your program

References and additional Materials

Software Engineering Process and Tools lecture, Quang Tran

http://www.informit.com/articles/article.aspx?p=376255

http://www.tamingthebeast.net/articles5/open-source-software.htm

http://googleblog.blogspot.com/2009/12/meaning-of-open.html

http://www.cippic.ca/open-source/

http://en.wikipedia.org/wiki/BSD_licenses

http://www.apache.org/licenses/

Logging class/method/variable name in Objective-C

Just a small post for an effective tip in Objective-C.

Usually if you use the

NSString *name = @"Hello World";
NSLog(@"%@", name);.
Output: Hell world

And usually, when we debug the program and viewing the log, we really want to know the class/method/variable name and line number as well. You can manually hard code it like

NSLog(@"ApplicationDelegate - applicationDidFinishLaunching - name - Helloworld");

But, it is really time consuming and repetitive task. For our company, we use

#define NCLog(s, ...) NSLog(@"<%@:%s:{%d}> %s = %@",
[[NSString stringWithUTF8String:__FILE__] lastPathComponent],
 NSStringFromSelector(_cmd), __LINE__, #__VA_ARGS__ , [NSString stringWithFormat:(s), ##__VA_ARGS__])

Another variant of this is (it combines both class name and method name into __FUNCTION__):

#define NCLog(s, ...) NSLog(@"<%s:{%d}> %s = %@", __FUNCTION__, __LINE__, 
 #__VA_ARGS__, [NSString stringWithFormat:(s), ##__VA_ARGS__])

Then you can just use it like NSLog. For example:

NCLog(@"Hello world");

Output: <ApplicationDelegate:applicationDidFinishLaunching:100> name: Hello World

Good luck to your new productivity:). For your programming language, stop using the System.out.println() and Console.WriteLine, find a version of yourself

References:
Log the method name in objective-C posted in stackoverflow

Print out the variable name in Objective-C posted in stackoverflow

RoboCode Team Battle (Week 4)

Hi, everybody, the robocode competition goes up to another level, promising more fun and more jobs for you guys. We just released a new rule this morning requiring people to compete in team, 2-2 battle. The era of 1-1 battle ended. This morning is just a practice for a new game. You do not have time to improve your robot a lot, that’s ok now. You just need to have a better communication with your ally.

Now, we just take a look at battles between 2-2. There would only have 4 teams this morning but creating a lot of fun and entertain for people. Poor you guys, the people not joining this morning

The first match:

The Red and the Blue guy on the same team while the White and Black on the other team. The match was quite in the first team when the Black guy use the still strategy, which was good for some robot cases that can not shoot the still robot

The second match:

The 2 yellow guys compete with Gray and Blue guy. The 2 yellows shoot quite correctly but the strategy of the other team is against the Yellow team when they move in line but change direction really fast.

The third match:

We found the anti-Indian guy. Welcome to Yellow guys, you guys did a really well job when running in a spin strategy and the Indian strategy almost dies.

Wait for tomorrow, when we will have a real team battle. Never have the case that we will shoot each other any more. And AWARDS, will officially be given for the first 2 teams tomorrow.

RoboCode Report Week 2

And now, we are already on the week 2. Different than week 1 when I am too busy to write some brief report. I will write some brief report, feedback and evaluation about the second competition.

First, come to the battle between Police and Indian. We can see that Police does not have a big improvement over the last week, while Indian goes into the next level by getting the ideas of running around the opponents from his own opponents (ideas started by Police). We also wait for some peole to kill that suck Indian. Everybody really wants to kill the Indian

Then, we come to the next match between Tester and Rammer. Rammer tried to implements a combining strategy between Rammer, Indian and Spin Bot. But, to be honest, it was an example for what people say : “good idea, bad implementation”. Rammer tried to change the algorithm at the bad times and the RunAway strategy was not good enough. Waiting for the next version when Ramming and Indian shake their hands:D. We also welcome the new comer, a handsome guy, Phan Vo. Hope that we will see a better implementation in the next version

Yeah, now, we see how good Alosa (a loser) is and if it is a real alosa. With a quick implementation in the Web Dev class (Buu will get disappointed for that news), a new version of SweetPo has come into the world. And welcome Huy, another new comer this week. Inherits from the Indian, Huy produced a better implementation. That’s so good and fit exactly what we expect when publishing our source code. I can see a good future for Huy in later versions.

RoboCode Game competition

Hi, I am really happy and excited that we, RMIT students (RMITC), held a good competition. It was just a beginning for a series of RoboCode , game competition as said in previous post. No more talking, I will show you a demo from our students first.

That’s really cool and so simple, and we will have many more AI techniques and Software development there. We will try to add some more intelligence, game strategies in those robots to make it really fun (I already had some ideas in my head). We also have several activities around like tutorials (Instruction 1 and Instruction 2), code review (I did code review for my friends, Khang Nguyen and Phu Hoang) and open some of our source codes (Khang Nguyen, Phu Hoang, Tuan Anh, and Khang Vo). You do not need to be an expert programmer to start programming with RoboCode, the only need is your PASSION. Feel fun, just start. Play and learn. You will become an expert soon

Two more video examples

So, now, how can you join? If you are an RMIT student, it should be extremely easy, just come in. If you are not and you want to join, please contact me: vodkhang@gmail.com so that I can arrange for you to join. Or just wait, I and Youth House also try to operate some robocode competition events.

Online Programming and Software Development Competitions

In my university, it was hard to find chances to go for programming and software competitions (like ACM and Imagine Cup), part of the problem is my fault as well. So, I usually find and join online competitions. Anyway, it is not the main ideas of this post. I want to introduce programming competitions that other people can find fun.

For me, competitions are chances to be fun, to boost skills and to communicate with other people. Fun may be the most important thing, because if it is not fun, interesting and challenging, there is no reason to do it.

1. TopCoder : a lot of kinds of competitions here. This is my favourite one.

A short competition lasts about 1 hour to compete with other people in a 3-problem test with easy, normal and difficult level. You can also do code review, challenge others’ solutions by your own test cases. I love this idea because now, your solution is both validated as well as verified by other people.

It is fun and realistic for software developer. You can even earn money. The only problem is that time to compete is really short, about 2 or 3 days and require in-depth knowledge about J2EE and .NET. I did not have any time to try out with this competition

This is a NP-complete problem competition. You can only find the way to make it better, find the most optimal solution. There are many kinds of problems here: range from encryption, game strategy and image analysis. I love game strategy most. The drawback is you have to spend a lot of time but I think that’s worth and give you a lot of fun

Bug Race will be good for tester, joining, finding bugs. Studio is good for designers. That’s all I know because I never tried this


2. Sphere Online Judge (SPOJ): Pure-algorithm competitions

I think this site is good for beginner and for people who wants to boost algorithms skills and knowledge.  If you are an algorithm lover, this site will be fun; otherwise, it seems quite boring when discussion and sharing ideas are quite limited. People compete with each other to try to get a little bit faster in time to be in the top. That is the disadvantage of this site, people spend too much time for a little performance improve, which is usually not a good practice for a software developer to do so.


 

An algorithm competition, challenging. I tried only once in last year and then this year, I think that I am still not good enough for that. It is a 3-people team competition by solving really tough algorithm problems in 5 hours. If you win, you can go to compete onsite with a wide range of topics: Information Theory, AI, Game Theory, Networking…

4. RoboCode (I think in www.diendantinhoc.org somebody is also interested in)
I am currently doing research and trying with this one for the purpose of RMITC club. RMIT students will try to learn by doing in this challenge. I hope we can learn in many different technologies: Event-Driven, Multi-threading, Agent-Oriented, Game Strategy, Software Design… See the demo below.

For me, that game looks like another agent game that RMIT Melbourne teaches for the course Agent-Oriented Programming and Design

Software Engineering and Algorithms

Algorithms and Data Structure against Software Engineering

Firstly, I want to talk a little bit about algorithms, data structure against software engineering.  Joel’s Article pointed out an excellent point that algorithms, data structure, functional programming is really important to learn, to challenge your mentality. And he is also right that current CS (and maybe IT, SE) degree is not hard enough, simply because if you designed a stupid software, it still WORKS, students will at least get  90+ points in your assignment. I see many not excellent students get 3.8 – 4.0 without any problems, because as Joel already stated, the problem in Software Engineering is when you have to extend, to make the software scalable, not when you create it. He’s all right about that. But he may make people misunderstand.

Algorithms is not the most important skill

For me, algorithm (if we consider it as a specific method to solve a specific problem rather than defined in wikipedia) is important, but it is no longer the most important skill and knowledge software engineer must have. Software engineers, nowadays, should expert about SOLID principles, and write reusable and maintainable code. Software engineers know how to design, architect and integrate between different system to write and maintain a scalable system. Software engineers can work with usability, working directly with client, understand and see the business and users’ world. These things require practice, thinking, learning from failure not just memorize them.  There are now many different jobs that do not require software engineers to become expert in algorithms, and also many great jobs requiring you to become algorithm expert. You may say that they are different jobs (like understand user’s business would be business analysis)) rather than software developers, you are wrong. Software developers now have to understand users’ mind, in general and specific domain to write usable features (read the Usability part in understand and see the business and users’ world for more details).

Algorithms != IT

Another misunderstanding about learning algorithms is that it will give you great mind in thinking in IT. It is right but not that much. In many cases, we work directly with a specific problem, like searching, sorting and computer vision. But that is a specific problem, people tried to solve it under a specific set of constraints. But software architect see the big picture, when to integrate, what to integrate and how to integrate. Both kinds of thinking are really difficult, requires creativity and experiences but hard to go for both. If people go too much into specific problem, it takes time to become an expert in another area. So, if people love one and want to become an expert in one, go for it.

But I like Algorithms

Personally, I do like algorithms so I usually do some algorithms competition in my free time on topcoder. Currently, I am working on this problem (another link if you can not access topcoder), if you want to join, just come. More people, more fun. I will write another entry to introduce about online IT competitions.