Sunday, December 16, 2012

LD48 GameJam, Finally got something together!

Bad Timing

This LD48 had a bad timing for me. Family ski trip on Friday, by the time we got back I was ready to go to bed, even though I wasn't the one who was skiing all day. Something about being up there in the fresh air makes me super tired. Saturday my youngest boy turned 6 years old:) He has been waiting for weeks when the day will come. Woke up in the morning and he asked right away "can I have cake for breakfast"? Crazy cute. Can't believe he's already 6!

Make that game

Didn't have much time to work on it but I was able to get the core mechanics done in 10-12 hours with some "ok" graphics. I even got a hidden bonus in there. Can you spot it? :)
I spent a little time on saturday during the day, but ll it was good for is to get the idea together. This theme is really cool so I am sure I'll use it next year for our One Game A Month challenge. I love platformers so I decided since there is no way I'll have time to make the game I really would like it mine as well work on something that I can use as the base in an other project.

I used MOAI with my TrexGL library on top of it and Box2D. It was the first time I used Box2D with MOAI and I am pleasantly surprised how good integration it has. The only thing it was lacking is support for the awesome PhysicsEditor tool. But thankfully the exporter API is fully documented so it took me less than 30minutes to write one. It will make a great addition to TrexGL ;)
There are no Good guys, and no Villain. I just have the debug draw turned on so I can run, jump, and climb around. It already feels good to play. I wish I had more time to finish it on time. It just needs a few entities, some shooting. Pickup the goods and the menu almost fully done.
But it is already surprisingly playable. That's it for me for this LD48, time to hit the bed it's already 6am, and in a couple of hours it will be time to put my daddy hat on.

Pics or it didn't happen

Here is a screenshot of the game with only the Box2D bodies visible. I really like this look.

And here is one with the background and the platforms added. Those light blue rectangles are moving plaforms you can ride on. The two in the top-left corner are moving horizontally and the bottom three are vertically.Wanted to make a demo video but I don't have any screen recording software installed at the moment. If I get time today to install one I'll upload a video as well.
Can you spot the bonus in there? :))

What did I learn?

A lot! I learn more about gamedev and my tools during any gamejam than I do in an entire month!
Look forward to the next gamejam challenge which is coming up in the new year. Join in to the One Game A Month challenge and let's make a game a month, every month in 2013.

Tuesday, December 4, 2012

Got a Tumblr account, it feels like Google Plus

Well it happend. I got called "Old School" three times yesterday for using a blog over
It was coming I guess but I still don't truly get what Tumblr has over G+? I use Twitter A LOT, to share random thoughts and status and I don't mind the 140character limit.

Tumblr calls it self a "micro blogging" platform. Looking at it it look a slot to me as G+ since there is no character limit and you can easily share anything. It has the social aspect of it as well and you can follow other accounts and repost their posts.

Tumblr advantage over G+?? It's app and the interface in the browser to share very easily any type of media. I am very impressed at how easy it is to share a video or image with the app especially.

So even though I got a tumblr account I'll continue to blog over here and post random game and app screenshots and other thoughts over there that don't make up an actual full blog post.
But most of my small stuff still will go to twitter. So if you want to follow along come on over to and follow me.

Saturday, November 17, 2012

360iDev Conf and GameJam huge success for TrexGL and MOAI


This was my second time attending 360iDev. It is my favorite conference. They keep the attendee count low and there is no speaker's lounge. That's right, you get to meet and talk to the speakers in the hallways which is a huge plus compared to other conferences. It was great to put faces to twitter handles and see attendees from last year again. As expected the conference was very informative and I enjoyed the sessions. But as always the most learning happened outside of sessions in the hallways:)

GameJam with MOAI

I was looking forward to the GameJam this time around. I had big plans to work on TrexGL, my game library running on MOAI. I wanted to finish up the iOS project deploy so with a click of a button I can turn my MOAI project into an Xcode project. I not only finished it but I was able to add a dynamic build script for the Xcode project so it auto copies MOAI files into the project at compile time. Once Xcode project created I can just work on my game and hop over and click Run in Xcode to see it in the simulator. I will add this into my TrexStudio project which will combine all these tools into one. All I need now is time to finish it up, time is my biggest nemesis.

Working on my tool and running tests I was approached by a lot of game devs interested in what I was working on. It seems MOAI is still a very new and somewhat unknown game library in the iOS world. Surprisingly every dev I've met and talked to about it was excited and wanted to know more about it. MOAI was especially well received by Corona devs since they can transfer their Lua knowledge and also MOAI's licensing compared to Corona's.


Although I am a couple of months behind launching it, I am working hard on TrexGL at nights and weekends to get it ready for the official launch of
I am hoping to help promote and introduce MOAI to many more devs and help new comers to MOAI gamedev with my TrexGL library and tools.

Saturday, September 8, 2012

PAX West 2012 ups and downs

I was fortunate enough to go to PAX West 2012 last weekend. And I did it in style:)) With 2 other fellow indie devs we rented a house in Seattle to keep the cost low and the awesomeness high.
Garage to the house was the smallest one I have ever seen. It took 3 of us to get our suv in it with a 12 point turn lol. Fortunately starbucks was in walking distance. The other partners in crime were @MarkusN and @VortexGamesInc . We originally wanted to get a joined booth but they oversold it and we got left out. It was a fortunate incident for me since this year I have been very busy with work and traveling.


The craziness started on Friday morning when we stood in line for almost 2 hours to get in. Once in, everything was very easily accessible. First time being at PAX I didn't know what to expect but it blew me away. It was very organized with a good map to easily spot your favorite booths. Tried out a lot of new games and watched many. It was amazing to see what a big core following some of the major titles have.

Visited the Indie Mega Booth. Very much enjoyed seeing indies showcasing their games. They had a ton of traffic and really welcoming setup. I couldn't help but promote them every where I went at PAX. Got some evil eyes when I told many standing in line to play ***** to go to the indie booth and try their game instead of waiting.

Got to meet Tim Schafer!! He signed a couple of posters for me that I had purchased and got a photo with him. Love his games and I am one of the backers of his new Adventure game. Totally made my day and the whole trip. Also got some quality time talking to the DoubleFine guys about their experiences on MOAI.


Too many very similar games. It was eye-opening to see how similar the big budget games are. I mean how many FPS do we really need? How many different post-apocalyptic earth scenes do we need?Zombie games are huge... I guess. I am tempted to make a zombie game because it seems like you are not a gamedev unless you made one. It reminds me of the early 2000s when everyone was writing a Python templating language lol.
The booths were spread over many different levels. It was annoying to go up, down and in between to look at things. Some panels were in the hotel across the street... It just felt that they outgrew their current location and tried to squish it in anyway.


I got to meet @MysteryCoconut on Friday and spend all day with him on Saturday. Enjoyed talking to him about programming and it was a breath of fresh air to find someone like minded. Saturday after we had enough PAX we went back to the house and did some code hacking with him. I got to demo my upcoming TRex Game Library for the MOAI framework. I have been fighting an anchor related bug for over a week which took him only about 2minutes to fix... "I love being the dumbest person in the room! It gives me the opportunity to learn a lot" Such a great time!!!

This trip was a huge success and after reading @Weasello awesome writeup on getting a booth at PAX now I am even more sure I will give it a go next year. Now I just actually have to finish my games and tools...

I am on my way now to Denver for 360iDev. Looking forward to meeting you all there.

Sunday, June 10, 2012

Battlefield for my 7DFPS game

Mountains and Dark Valleys 
Here is the first update on my #7DFPS game I am developing. I only started to work on it today and it's already playable. Well not a full game yet, but it has a huge terrain with mountains and dark valleys.You can walk around the whole area, so fun.
I made the terrain using the super awesome Terrain Toolkit. Surprisingly that was the simplest part. Adding a first person character and make it properly walk on the slopes was pretty hard. Although I am sure it's me being inexperienced working in Unity and 3D.

Give me the weapons
Once the terrain was out of the way it was time to add some weapons.Since I am keeping it simple I just used the cube and sphere provided by Unity. This allowed me to add 2 weapons to my player in an hour. Once they were aligned properly I just had to make them fire. I think that was the coolest part when I filled the the bottom of a small hill with bullets and bombs. Since it had no collision detection whatsoever they were just sitting there, lol.
I was surprised how tightly Unity integrates with JavaScript. I really hope someday Cocos2D will have the same. It was pretty simple to add collision detection for both the gun and the grenade. Sound was a little bit accord, in unity you have to add an audio source in the UI and reference it in code. But I am sure it's just me being rookie.

Whats next?
Need to add some nasty zombies to shoot and explode. Not planning on making 3D models so they might be just some square mesh running around.

Here is the current game play, so much fun already :))

Friday, June 8, 2012

Doing 7DFPS with a busy schedule. Why not?

Heard about 7DFPS many times before but I wasn't very interested to participate in it. I have been very busy to finish up 2 of my projects I am working on, and trying to stay focused on them. Also finishing up client projects too so I really need to keep distractions to the minimum.

BUT! I made the mistake watching their keynote video, which totally won me over.

Since I had such a great time doing LD48 and it provided very valuable feedback on RaptorGL and gamedev in general, I decided it will be a great way to learn more Unity3D. So I have been working on my schedule to make it fit with current projects, but still be able to make a playable game.

My goal is to keep it very simple. I got 2 different game idea right now but both of them will have the same winning requirement: Kill 4 enemies to win the game :)
I know it's not too ambitious but I want to finish it and make it playable if time allows I'll add more to it:) I want to make something really fun and actually Finish It.

Tools I will use are Unity3D, Blender, Photoshop, and Xcode. I am going to publish updates as I go so follow along. This is my first time writing FPS game so lets see what I can come up with:))

Here is the 7DFPS Official Keynote, who knows it may inspire you too ::

Sunday, April 22, 2012

Game Level and Rapid Prototyping Demo

Wow what a ride! I can't believe that 2 days ago I had nothing and now I got this really cool partially complete game, with many fun and cute characters.
In this Game Level and Rapid Prototyping Demo I showcase how easy and natural it is to edit the game state and entities real time.You can even replace the entire Update method and plug your own in to test different ideas.
Also you can see how well the pieces fit together. All I have left is the bad guys and some Game Mechanics... which is pretty much the other 50% of the game.
I really enjoyed being part of Ludum Dare 23. I am going to do it again. It has such a great reward bringing my "pet project" to the next level and watch it grow up over the weekend.
I got big plans for RaptorGL which I wont talk about until each of them becomes reality.
Watch the demo and let me know your thoughts about it. And YES I will finish this game up, I kind of have to anyway my boys hardly can wait to help Captain Ant protecting his "Tiny World"

New game music, Level1, full Menu and Scene swapping

Wow, what an amazing productive weekend, and it's Not over yet.
This demo you can see I updated the main character to carry his gun. Also added new music created by me. I used my iPad for music making and Audacity for editing it. Also implemented a full on Menu system to navigate in the game and turn on and off the background music.

The transition to the menu and Level1 uses Scenes. I wasn't happy that I had to use the instance as the reference so I re-wrote the swapping to use text ID instead. Very happy with it.
Watch the video enjoy.

Saturday, April 21, 2012

Demo video of game opening scene and RaptorGL sound demo

In this video you can see the opening scene of my game with a small animation and also watch as I demo the sound module.
Very proud to announce that thanks to Ludum Dare and the ambition that came with participating RaptorGL has a brand new cross browser multi channel sound module. You can play many sounds at the same time, and also have a sound loop and all the other sounds will play on top of it.

This is a huge accomplishment and LD23 is already a huge win for me!

Created a game poster, Introducing the game characters

Finished the art for the bad guys. I was going to code first and use simple surfaces, but I got carried away and got in the zone so I cranked out the art.
I actually like it this way. I have a visual feedback on what characters are going to be in the game. It also gave me even more idea for adding levels etc.. That is definitely not my goal for this weekend, but it could turn into a bigger project.

So here it goes the Game Poster:

Friday, April 20, 2012

Here is my Game and concept art for LD23

It's the 5 hour mark of Ludum Dare 23, and I finished the game concept art.
My game is::

Captain Ant: Protector of his Tiny World

Captain Ant was walking in the forest. As he walked he came across a bottle he jumped on top of it to walk over it. BUT he did not pay attention and fall into the bottle through the crack. He was unable to climb out of the bottle so he made him self home with grass and other things the wind blow in through the crack on the bottle. It was his "Tiny World".
But just when he thought he can relax other bugs started to show up and trying to invade his tiny world he worked so hard. He had no choice left but to grab his good olde trusty Bug Buster HD45 and protect his tiny world from invasion.

First game art from my Ludum Dare game

Game concept art is done, all its left are the bad guys. Very happy how it turned out
Here is the first of many images, I have to post the gun first of course.

Ludum Dare 23, Let's have fun!

As blogged about it before I am participating in Ludum Dare 23 a 48 hours game jam, and going to use RaptorGL to see it's strengths and weaknesses. I made a ridicules mistake last night and started a re-write of the Sprite class, so I have to finish that before I can get going on the game.

LD23 Theme: Tiny World.

I got a few ideas to explore and surprisingly only one of them is a platformer. I say surprisingly because I really like platformers and always in the look out to find an excuse to make one.
There is lots of way to interpret the theme. Large player trying to get through a tiny street in a Tiny World, Player can jump from one continent to an other since it is well Tiny World etc... and the list goes on.

I got everything ready at my office where I will camp out for the next 2 days as you can see in the image. I am going to post updates as I go, so stay tuned

The other tenants at my office are Very supportive about my game jam. They just can't get over that I will actually spend my weekend making a game. One of them (Theresa) especially, she left these notes on my door. She is working tomorrow morning so she is going to come and visit what I got done, talking about pressure.

Saturday, April 14, 2012

History of RaptorGL, my pet project Part 2

Part 2 - the final part of the History of RaptorGL, my pet project.
If you haven't read Part 1 yet you should!
The Rebirth of RaptorGL

In September 2011 I attended the  360iDev conference in Denver. It was life changing!!! No really it was. I met so many amazing developers, many of whom I have been following and communicating through Twitter. During one lunch panel they showed off all the games they built the night before on the game jam. It instantly reminded me of raptorgl and how perfect it would've been to prototype a game together and then just stick it in a UIWebView shell. Before I got back from the conference I started to read up on the latest changes in javascript and animation to see what new I could adopt. To my surprise there was a lot of new developments just in the past 6-8 months.

After reading up on the most relevant subjects I began the work on raptorgl. But after 4 months of coding and constant changes/fixes I came to the realization that I am just duct-taping the current code. As much as I hated to admit it, for raptrogl to be... well... like a raptor (fast, agile, and smart) it needed a re-write. Not just any re-write but a re-write from the ground up, a full re-write.

March 2012 - after doing my last checkout from the old repo I deleted it and recreated a fresh new one.
RaptorGL died... Long live RaptorGL!

I began my journey of the full re-write. To my biggest surprise I found many advantages working as a single developer. I believe it helped quicken the progress of the new development since I didn't have to schedule who would work on what. Also I could make major changes in any part of the library without worrying that it will break another developer's code/implementation. Another surprise to me was how much the code for each feature changed, I mean the name was the same rgl.Sprite but the implementation was totally different. It was simpler, faster, easier to read, and it compressed to a much smaller size. By the end of the month I had a very solid codebase which had the most important features but almost none of the code from the original.

I felt really good about it so I was looking for an opportunity to test it out. That's when I remembered that what started the spark again was the 360iDev game jam and there is a game jam I have been dying to be part of... Ludum Dare 48 hours online game jam event. Wow, what a better way to find bugs and test it's features than Ludum Dare. So I went ahead and created an account and started to get ready. But I also realized that to make sure I won't back down or come up with excuses I better get some help to hold me accountable. I started to tell everyone about Ludum Dare and that I will participate in it. I also posted a link to the RaptorGL website on twitter. The response I got was amazing and extremely inspiring, I am so glad I did it. So right now I am busy getting RaptorGL ready for Ludum Dare and finishing up the major features so I can release it by the end of the summer.

Writing these posts gave me a great opportunity to reflect on the ups and downs of the project and a new appreciation for what it takes to start and continually work on a side-project. The process requires commitment and desire (which both tend to wane as time goes by) but sticking it through can lead to an overwhelming sense of accomplishment and satisfaction. Hopefully this will help others get the spark back for their pet project.

In the next couple of weeks I am going to start posting Code examples and a couple of short Videos that show off some of the features that would be hard to write about otherwise.

If you haven't yet, take a look at the RaptorGL website and spread the word.

Thursday, April 12, 2012

History of RaptorGL, my pet project Part 1

The Birth of RaptorGL
It all started back in 2008 with a need for a project I was working on. A client needed an animation for their corp. intranet site.  Since their network blocks flash they were looking for an alternative. So I created a simple DOM based animation with a bunch of div's and the images set as their background. It worked great and everyone was happy. The implementation wasn't the prettiest, but it worked and I did not have to worry about other javascript code getting in the way.

But something was really intriguing about it that I could just use a browser and some divs and animate it with Javascript. A Love Affair started...

So I decided to spend a weekend and experiment on how I could improve it and make it modular to be able to reuse it. I decided that the first thing I have to do is move away from DOM and use the Canvas. Thanks to lots of articles on the internet it was a quick and painless move. Once I got a working copy of the same lib using canvas I started to refactor the code and put it into it's own namespace. I had to come up with a name and Javascript Animation and Game Studio was born, or jsAGS for short. The empty repo is still on Launchpad and I'll leave it over there for historic reasons :)
I was changing it so rapidly and breaking compatibility with previous versions that I decided not to make the code public. Didn't want any angry users.

Over the years I added a lot of great functionality inspired mostly by PyGame. My 2 favorites are SpriteGroup and Surface

SpriteGroup allows you to group related sprites into one object, like bullets. Which is really cool because each update the game loop needs to call updates only on the SpriteGroup and not on every bullet sprite. Then the SpriteGroup can loop through the array of sprites and update them as needed.

Surface allows you to prototype a game or animation without any image. It supports simple shapes like rectangle, circle, and triangle. This gave a Huge boost to development and as far as the Sprite is concerned it's an image, so when the dev is ready he can just swap the surface out with an image.

Development stagnated in 2010 and it I stopped using it altogether due to lack of time. Last year in 2011 the interest sparked again to write some simple games we can play in the browser. I quickly polished off my code and it was used as the basis of this new project. 

I was unhappy with the name so a friend and I were brain storming on it, after many choices I came up with Raptor. Basing it off of movies I liked how smart they were, agile, and fast. So Raptor Game Library or RaptorGL was born.

We were rapidly working through the code and iterated lots of changes. I was writing the core code and he was writing examples/tests for each feature. We made good progress but then again life and work got in the way. By August I was the only one committing to the code base and RaptorGL became a single developer project again. Then I lost interest again...

So if you haven't yet, take a look at the RaptorGL website and spread the word.

Monday, February 13, 2012

My secret weapon... Python

I came across this blog post the other day "Why Python is important for you" . It felt like he read my mind. I was going to have a similar post explaining why I believe everyone should learn at least basic Python coding. But since he wrote it up so well I let you just read it "why" and instead I tell you my love affair with Python and why I it is my secret weapon.

I use Python for my work every day. I write all the backend software for clients iOS apps using the Django framework. Also use Python extensively to talk to 3rd party APIs and collect/crunch data. Automate a lot of things that the software needs to do without user interaction. It is ridicules how simple to update a bunch of file, replace code in them. And python has a Giant standard library you can use and it pretty mush covers everything, or as they say Batteries Included.:) But if you still not convinced look at all the places python used, also MIT switched to Python from Scheme.

My love for Python started back in 2003 although I started to use it in 2002 to parse log files. Switching from Perl to Python was an awesome experience. We got our first digital camera and taking a lots of picture. But when downloaded to the computer we had a couple hundred images with IMG_00433 etc.. My wife organized them into folders using the thumbnail view but it was still tedious. So to make my life easier by making hers easier:) I opened up python prompt and started to hack out a quick renaming script. She loved it. now it took no time at all to rename a bunch of images and she could even provide the prefix "birthday_". Then she was mad since some of the images needed rotating, no problem there is a battery for that, lets get PIL add an other function, an other command line question if she wants auto rotate. Done. It was so painless and fast to implement that for awhile I was certain that everyone wrote a script like that just like everyone wrote at one point "Hello World".
Well it wasn't the case and there was a lot of happy people around me using this simple tool.
That's when Python became my secret weapon, and it is ever since. 
Well, not so secret anymore...

If you haven't touched python yet go and open up your terminal if you are on a Mac or Linux and type in at the console$ python and start playing. On windows just download the installer and you are a few clicks away.
Python uses white-space indentation instead of curly braces which makes the code beautiful and reading it a pleasure.

Friday, February 10, 2012

My new texteditor Sublime2, Essential packages and Pro tips

This week I read Quick Review of Mac OS X Text Editors for Lua...
In there I saw Sublime2 and since I have never heard of it I went to check it out. After reading the feature list and looking at some screenshots I just knew I have to give it a test drive. After download and install I opened up one of my django file. Immediately recognized the syntax and presented me with a very nice syntax highlighting. To my biggest surprise even auto complete worked. After reading up some of the docs and a couple of blog posts I learned that I can do pretty much anything without my hand ever have to leave the keyboard. I am a longtime vim user (although vim was not my choice of texteditor in day to day programming), and it felt good being able to open files, jump to any function/method and even install new packages without using the mouse. At this point I closed my eclipse and I knew it was not a temporary move. I had tried many texteditors/ides over the years but I always ended up going back to eclipse. Eclipse is a very convenient ide with all the language support I needed, but it is also a resource hug and many times it overkill what I am using it for. Sublime2 is a great compromise with it's functionality and simplicity.

Essential packages
Below packages in my opinion needs to be installed after a fresh new sublime install.
  • Sublime Package Control
  • Soda Theme
  • Bracket Highlighter
  • Prefixr Plugin
  • Djanerio
  • Sublime Linter
  • Sublime CodeIntel
I started with the Sublime Package Control package because once that's installed you can use it to install the rest.:)
  1. Open up Sublime and press Ctrl+` that will open up the console
  2. Paste this into the console:
    import urllib2,os; pf='Package Control.sublime-package'; ipp=sublime.installed_packages_path(); os.makedirs(ipp) if not os.path.exists(ipp) else None; urllib2.install_opener(urllib2.build_opener(urllib2.ProxyHandler())); open(os.path.join(ipp,pf),'wb').write(urllib2.urlopen(''+pf.replace(' ','%20')).read()); print 'Please restart Sublime Text to finish installation'
  3. Press enter. It will install the Package Control for Sublime.
  4. Now restart Sublime and you are ready
Now lets install those packages. All you need to do is Press Cmd+Shift+P. This will open the Command Window, type package to sort to the Package commands. Select Install Package and it will bring up the package search window, there just start typing the name of the package and press enter to install. That's all, it just does not get any easier than that.

To enable the Soda Theme open preferences and user settings. Add this into it

"soda_classic_tabs": true

Pro tips
Here are some of the commands I learned and learned to love spending less than a day with Sublime2. I will keep this list update as I learn more of them.

  • Cmd+Shift+P => Brings up the Command window, you can access pretty much everything here.
  • Cmd+P => Open anything window. My FAVORITE feature, you can just start typing and it will display all the files that insudes the typed in text, then press enter and open it. Seriously this saves a ton of time when you know what file you want to open and it is burried many level deep in directories.
  • Cmd+R => Find any function/method/class window. This is an other huge time saver. Once you typed in text it will display all possible choices, Use the arrow key to scroll through it and it also moves the cursor immediately at the location. Got to love it!
  • Type lorem then press Tab => Inserts a full paragraph of lorem ispum text. I am pretty sure everyone uses it to fill up empty space to represent content.
As you can see I jumped into this love affair head first. So far very impressed with Sublime2 and at this ppint I see no reason why I would need to go back to eclipse, unless I have to write some code for Android which I am not planning on but who knows...
I am going to write up an other post on basic configuration and how to create Projects with Sublime2 and switch between them using your keyboard only.

Monday, February 6, 2012

Syntax highlighter for my blog posts

Adding a syntax highlighter to a blog is so much simpler than use to be. Since I am planning on posting a lot of code on this blog I wanted to make sure I have this in place as soon as possible. Fortunately this is as simple as adding css and js to the Blogger template and wrap the code around with <pre class="prettyprint"> tag. After testing a few of them I ended up using Google Prettify. I like how simple it is to integrate it and it auto picks up most of the languages, so I don't have to reference it. Yes I know I am lazy, but lazy programmer is good.:)
So here is the first test:
$(document).ready(function() {
   var syntaxHighlighting = 'Super Simple';

And a second one:
class Test(object):
    def __init__(self):
        self.test = True

And a third one:
- (void)sayIt
    NSString *str1 = @"Syntax highlight";
    NSString *str2 = @"Super Simple";
    NSLog(@"%@ %@", str1, str2);

I chose the desert style even though my IDEs have light background, but it helps to make it standout in a post.

Friday, January 27, 2012

Package dependency hell

I thought that dependency issues are a things of the past. I mean it is the 21st century after all. Well not so fast. Today I had the pleasure to spend 20 minutes to install python-ldap. One of my iPhone app project is a Point of Sale app. It connects to the backend for categories, products, and user login and uses the company's LDAP server for authentication.
Simple task isn't it... not so fast. Backend server running Ubuntu linux. I am writing all my server code in Python using the Django framework.

Let's see what we need to accomplish it:
Started by running pip install django-auth-ldap... Success. to install into the virtual environment. Installs without issue, nice. Next lets boot up the Python shell and try to import it and do some testing... Failed. Gives me a nice message that it's missing python-ldap. No problem lets jump out of the Python shell.Run pip install python-ldap... Big fat fail "error: command 'gcc' failed with exit status 1". I've been doing C coding for awhile to know that's not a good sign. First I though it maybe a virtuelenv issue so I tried it with the package manager, sudo apt-get install python-ldap... Failed. WTF!! How can it be?! I mean if Ubuntu does not know how to install it properly then who can?

Well I have been using Linux since '94 and no I do not have gray beard or beer belly. Looked up how can apt-get check metadata, found build-dep. Super. Lets run it again sudo apt-get build-dep python-ldap... Success. Long behold it found an other 55MB worth of packages it needs. Gave it 'Y' to install and after a few seconds I got my shiny python-ldap up and running. What I don't get is why on earth Ubuntu doesn't do this by default, or at least give me the option after a failed attempt.

Thanks to django-auth-ldap good docs the rest is history. Now the app authenticates every user with their LDAP credentials and marks all their sales. Sweet :D

Thursday, January 26, 2012

Finding the right domain name is a challenge

Last week I decided it's time to start blogging again. This time though I plan on staying on top of it and share my indie experiences and/or struggles. I have been a loyal reader of iDevBlogADay. Envy their commitment and they are inspiring me to do the same. That was the easy part. Then came the question "what should be the domain name"? Should I just keep it on a subdomain by the blogging platform or get my own? If I get my own should it be my username I use on all the social network sites or something unique?
So many questions, unknown... I turned to twitter as usual and trusting that some kind folks will help me out. Sure enough there was a few replies with great ideas. Inspired by the awesome list, my wife ended up with the winner. I like what it means. I always have been a rogue coder who does not follow the trend and does not tries to do fancy design patterns. I have been doing software consulting for over a decade now and I can tell you from experience that all my clients care about is ship the product on time. Or as Jamie Zawinski said it in Coders at Work "At the end of the day, ship the f@#!%$& thing!". If you haven't read Coders at Work Go Do it Now! It will change your life. 
I code by 3 rules (even rogues have rules) but that will be an other blog post. So you have to come back and read it.

Thanks to you all encouraging me to start this journey. Will do may best to keep up with it.
Stay tuned I got lots to share.