I recently came across an article, Writing a Primitive Debugger. It goes through what a debugger does and the basics of how one functions. I was reminded of a debugger I created for Rhomobile’s Rhodes applications.
There are some key differences between the two. As mentioned in the linked article, a debugger needs a few basic functions to be useful. My goal was to have a useful debugger that could stop at a breakpoint, inspect variables, and execute arbitrary Ruby commands. I had read an article about using GDB to debug Ruby and started initially with that approach. At this point, I really wasn’t writing a debugger but a UI for GDB and Ruby. This worked great when running on the iPhone simulator which runs as a process on the local machine, but did not work on mobile devices or any other platform other than the iPhone simulator.
My approach to this was to work at a little higher level. One interesting feature I had come across in Ruby is set_trace_func. When set, the execution steps of the Ruby VM also trigger your trace function. While this does significantly slow the program down, it allows you to accomplish nearly everything you need to do for a debugger. I adapted this to allow debugging of the application via a TCP connection. I may go into detail later, but you can see the original code that I wrote for this here. It has since been expanded to the full debugger that is being used today, adding complexity and integration with an existing IDE.
When working on a development project, there are often tasks or features that are common for that type of project. For example, a website may need user management, or a batch processing system needs a queuing system. One thing you should always keep in mind is to not reinvent the wheel.
There are many libraries available depending on the choice of language and environment. Ruby has a plethora of gems that tackle almost everything imaginable. Python has pip which is very similar to ruby gems. Before you decide to roll your own implementation from scratch, you should always take some time and see what is available. You may be able to find a package that fits your needs and can be reused saving valuable development time.
Here’s an easy twist on omelets. Preheat the oven to 350° F. Halve an avocado, remove the pit, and scoop out some of the green flesh. Break an egg into a bowl and carefully place the yolk in an avocado half, followed by the white (there might not be enough room for all of it). Repeat with the other half. Make sure to season and add your own toppings before baking for 15 to 20 minutes.
After nearly 8 years in mobile development and related work, I am moving on. My passion is for development and while I have many skills in other areas like System Administration, QA, and Support Management, I find that writing code is what really makes me happy.
I have recently joined Monetize Solutions as a Sr. Product and Monetization Engineer working on advanced monetization products. Basically we are creating products that will work with our customers raw data and provide meaningful information that directly affects bottom line revenue. This could mean determining the optimal product inventory configuration or the right cross sell relevant recommendation given the time of year, location demographics, geography, historical sales profile buying behavior, and social sentiment.
I am looking forward to getting back into full time development, and I am excited to be creating products that have direct positive impacts for our customers.
There has been lots of changes in my life recently and life is slowly returning to “normal”. With this I have decided to bring my blog to life. It has languished long enough with nothing here and I this time I plan to keep it up and running.
I will be posting many things, from technical content, photos I have taken, and even things I just want to save for later. This is my personal space and contains my own ideas and thoughts, independent of any business, company, or work I may be doing in my professional career.