Initial Commit: XtremeLoader

Initial Commit: XtremeLoader

Development

This is a log on my work for an app I am currently developing which I named XtremeLoader. The purpose of this app is to utilize the Quick loading service of LoadXtreme. This is an online service that enable loading to lots of services which can be helpful on some scenarios. What I like from this is it also has access to promotions I don’t even know it exists.

There have been a few existing apps made for this including the official one recently although I am not comfortable using them since it requires me to log in first and I am only interested in using the quick access. So I decided to build my own which I might be also needing for personal use as well.

API

First of all they don’t provide a developer API. Yes I am simply directly accessing their AJAX pages. I find it also safer since it gets their up to date data and is also utilizing SSL which makes data transaction secure. I believe even though they don’t intend to share this kind of data, they will still benefit from this because the transaction still goes to them. I don’t monetize this app anyway.

Target Platforms

I am planning to target Android platforms. But since this is a hybrid app, I am also planning to make this as a single page application for non-android users. But that is for a later development, although I already have started another repository for that.

Framework and Tools

For the core app itself I decided to use jQuery Mobile for a lot of reasons. Well first of all, because it support even older phones or at least those who are using Android 4.0 (Ice Cream Sandwich) or higher. Although when I tested it using Android

I didn’t like using crosswalk though especially for simple app. Crosswalk is an embedded webkit browser that make modern HTML 5 webpages compatible to the mobile phone. The problem with this though is it makes your app a bit bloated (for more than 30MB). Which becomes a bit of a problem since I live in a country with slow internet connection. Also it gets a bit overkill to make large app that isn’t that complex

For development I use grunt, it is a good tool especially lets you automate a lot of things. The tool I use mainly is the HTML build which lets me split the pages into mulitple sections and build them. I also use other grunt tools like concatenate and uglify that would compress the scripts into smaller size. Although I don’t minify them while under development for easier debugging.

Initial Design

So here is the initial design:

Initial Design

After attending a seminar from coins.ph, I realized that I need to work on the design to make it more user friendly as their app does. I’m not that good in design and I often rely on available template when working especially since I’m more of a back-end developer. So what I did as of now is I had to split the long pages into two to make it easier to fill up as well. Also just to avoid scrolling.

It’s in black as of now since I feel comfortable working with dark background but I will eventually change it to white and add a setting where users can change the color as well.

Future Plans

There are a lot of things features I would like to add such as recent transactions, and the other quick access as well but my first goal is to be able to launch the basic functionality. I was able to try online loading on a prototype on my device which is a good first step, I just need to finalize it before launching at Google play store.

Links

You can find the repository here. As of now the instructions are not clear, but if you would like to check it out you can run the build folder on your webserver or use http-server it’s a good tool. Feel free to contribute if you like either from source code or posting an issue. There is also a repository for the cordova project

 

Starting a New Hobby with Arduino and IOT

Starting a New Hobby with Arduino and IOT

Development

I just received the Arduino starter kit I just ordered from Tinkbox, and I’m now excited to learn building things with this. The kit includes an unofficial starter kit, and an Arduino clone which is still compatible to the existing drivers. Well not bad since the original kit and board is expensive. The board is also loaded with a sample blinking light program. Probably added by the owners while testing.

Arduino starter kit
Uno R3 with breadboard running sample blinking led sketch

After a week of waiting, I can finally work on personal projects which I might be using at home as well. Projects like maybe a gas detector (because I’m having suspicions with the gas tank or maybe just paranoia), an irrigation system, or timed water valve switch. Lot’s of possibilities really it’s the Lego™ ordinary building blocks I used to play back then where you can build anything only your imagination is the limit.




 

A few weeks ago, I have attended IOT Summit Philippines, an annual event sponsored by tech companies (such as E-gizmo, Thinklab, etc.), that hosts a development workshop and hackathon for those interested in arduino and internet of things. It was also amazing since I get to work on a gizduino IOT board, a customized Arduino board that includes a LAN port, micro SD slot, and higher flash memory.

iot-board (Large)
The gizDuino IOT-644 by e-gizmo™

A bit pricey compared to the Arduino clone I purchased if you’d ask me but still cheaper rather than expanding your board with Ethernet and micro SD shields.

 

Internet of Things (IOT), at this moment is becoming a new trend in technology. It enables you to connect anything, like a household appliance, or industrial apparatus, or even personal tool and exchange data. Not only you automate things, but you also send them to the cloud and it’s up to you on how you process them.

I believe this is a good hobby and is great for anyone who is interested. Even for kids since it doesn’t require you do use a soldering iron. I’ve been seeing foreign 13-year olds (or thats what they sould like :D) building robots in youtube videos and some instructibles articles. And I believe schools should be teaching things like these since it introduces the exciting world of electronics and programming.

 

The Importance of Distributed Version Control Systems

The Importance of Distributed Version Control Systems

Development

These days, the use of Distributed Version Control Systems (DVCS) has become a standard in most large products. It is an automated to save a lot of tasks, and resources such as disk space.

What is DVCS?

For those who don’t know what distributed version control is, it is an automated way of storing changes on your code while collaborating with other programmers under that shared project. Think of it as creating backup copies of your project on your drive (and probably adding dates on your compressed folders) and merging your latest code with your teammate. Without this, the task would be very tedious and also use a lot of resources especially if you have a very large project.

Even though such system exists, a lot of developers still prefer the old fashioned way of collaboration. Either they are unfamiliar with this kind of workflow or they find it confusing and complicated especially when creating and pushing commits which creates an additional task. Or another reason would probably be the fact that the team is too small to implement this kind of workflow. But even when working alone, it is still recommended to use DVCS especially the fact that you can view your history, and back it up as well on free repository servers such as Github or Bitbucket.

Reasons to Use DVCS

Here are a few common reasons why every programmer or teams should be using distributed version control systems.

 

  1. Backup. file-copiesMost DVCS has this feature called commit. When the developer commits his/her code, it creates a snapshot of the changes made to that project and is stored on the local workstation. Like a time machine, you can view your past revisions, or get some code you have erased in the past. Not only that, you can push your changes on a centralized server like Github, and whenever someone pulls those changes, they too can have a copy of the revisions you did alone with your latest code.
  2. Collaboration and Merging. centralized-collaborationThis is also an important tool especially when working with others. Softwares like Git/Mercurial allow you to merge the changes you have made. In fact, they have a smart way of merging code automatically especially when changes are not made on the same lines. But if the smart merge can’t figure out how to merge it since you’ve edited the same lines which can’t be avoided, a mark is added which can be easilly found that there is a conflict on those files. In fact, there are also free visual tools that make manual merging more easier.
    As I mentioned in #1, all commits are distributed to everyone who pulls the changes (Yes, that’s why it’s called Distributed Version Control). Everyone can see what changes were made by the other developer, you can even check how long was he able to make the change or when was the change made
  3. Branching.branching-concept This is a bit more advanced workflow in collaboration but can also applicable even to those who are working alone. When you don’t want your change to affect what others are doing, like probably you are working on an enhancement and it might interrupt on the work of your teammate or you just want to do some changes to be thrown away later, you can simply use branching. If you’re into sci-fi (like me), branching is somehow like creating alternate timelines. Well basically, you are just making a new path for your revisions which if it turns out right you can merge it to your main branch. In fact everything you work on in either Git or Mercurial is a branch which just happens to be a default branch at start. Merge conflicts even create temporary branches that are merged after they are resolved. Branching is a very powerful feature of DVCS
  4. It’s Free!free Well yeah probably one of the best perks in life come in free. You don’t even need to spend a dime on popular programs like Git or Mercurial. In fact, the creator of Git, Linus Torvalds (the same guy who created Linux), worked on this because the current free closed-source version control system he was using was no longer free. Git and Mercurial will always be free to use as it uses a free and open source license. Although there are also some paid softwares, you’ll do fine with the free ones.
  5. Contributing to Open Source.
    bart_os
    If you would like to contribute to open source projects especially those hosted in Github or Bitbucket, you would need DVCS like Git in order to make pull requests. They have a workflow when it comes to contributing such as forking the project (creating a copy) and you can make a pull request to apply the changes to the original project.

 

Conclusion 

The use of DVCS is a very important practice for developers either working solo or with a team. You can either use Git, Mercurial, or even Bazaar(although I’m not sure if it is still being supported) for your projects if you want to implement this kind of version control.

There are may work flow and strategies on implement this which I haven’t covered but I suggest you check it out first especially before implementing it to your team. Here is a good place to start and find out what is the best work flow that would suit you well.

Here is a list of free resources to start with:

  • Pro Git – Free ebook by written by Scott Chacon and Ben Straub published under Creative Commons Attribution. You can also purchase a hard copy from Amazon.
  • try.github.io – An interactive introduction provided by codeschool for basic commands and concepts in git.
  • hginit.com – A good intruduction for mercurial. Provides illustrations and some basic concepts.
  • Mercurial: The Definitive Guide – Although as far as I know, when you install Mercurial especially on windows, an ebook already included. But you can also purchase a hard copy at Amazon or O’Reilly Medi
Devcon Laravel Code Camp Recap

Devcon Laravel Code Camp Recap

Development

On March 14, 2015, DevCon, with the sponsorship of Globe Telecom, held a Laravel Code Camp which is a free seminar and workshop. Although they were not giving certificates, you can still benefit a lot because of the good topics you will learn especially for development with Laravel.

In the first part of the Code Camp, they discussed an intro of Laravel, some brief history about it, an introduction to Homestead,  and some cool sample projects that are also available on the web. As for promotion, Globe also introduced their development api for their services which also seems pretty useful.

Some experienced Laravel users immediately became mentors which also made the Code Camp more lively as they were able to guide first time users (like me) through using Laravel. It was also great because I was able to ask some questions and gain some ideas in using the framework.

Homestead

IMG_0392
“Hello Homestead”

This is one of the topics I had to skip in working with my laptop to keep up with the training because I would need to set up a virtual machine but I believe this is still very important especially when you are going to develop for a cloud server like AWS or Digital Ocean.

Base on that I understood, Homestead is a “Vagrant box”. As for vagrant, it is a software that lets you create development environments. Homestead includes all the software you need for developing laravel and other PHP apps as well which I believe somehow would try to mimic your production server. It would reduce the chances of having developer problems like “It works on my machine but not on the server”. Since your development environment is similar to the server and you can be prepared to any problems that your code might encounter in the server.

Laravel 5

At the point of this writing, Laravel 5 was just released a month ago. So I can’t blame the on the spot mentors and speaker if they are also having difficulty in using it whereas they recommend to use Laravel 4.2 for the meantime.

The folder structure has changed … a lot. I mean coming from a different framework user, I find it also hard to navigate because folders like modes, views, or controllers have been moved to different places. There has also been some changes with the api as well. But I think most of the changes would mainly apply to the directory structure and I believe they had a reason to do this.

Despite of that, while using Laravel 4.2, I was able to adapt into using it. I liked the dynamic DRY templating system it is using called blade.

The ORM was also good actually and very easy to use which I found the active record much simplier than other frameworks like Codeigniter or CakePHP.

Conclusion

To further conclude, the Laravel Code Camp turned out to be great as a lot of information in regards to development and best practices as well such as using Homestead as development enviroment.

I have also learned from the Laravel professionals that their company is also using it and they claim it to be a very good framework. It has also allowed them to develop systems faster.

As for Laravel 5, since it’s new at the point of this writing, not much tutorials and books for Laravel 5 can be found (although I might consider youtube). The documentation is also a good resource though.

 

Other Useful Links:

forge.laravel.com – an admin tool that lets you connect to your existing cloud server which allows easy managent rather than using a console ssh tool.

Laravelsnippets.com/laravel-tricks.com  – Some good resources to find codes

Burnmsg.com – a website created using laravel. Lets you compose messages that will be immediately be deleted once read.

developer.globelabs.com.ph – promoted development api by Globe. Offers free initial load for to new users.

cheats.jesse-obrien.ca – cheatsheet for getting around with the Blade templating system.

laracasts.com – a website that offers video tutorials exclusive for Laravel. They describe this as a “netflix for developers”

Photos

New Design for PHPPad

New Design for PHPPad

Development

I have just updated my project called PHPPad. PHPPad is an application that lets you fiddle around with php scripts on your browser. I decided to create this back then when a website I run php codes went down since I’m a bit lazy in creating new files and running snippets to test logic. I didn’t used much design standards as it started though.

PHPPad first
First design of PHPPad

 

This has been useful as it also helps me while working on some formulas and logic.

New Features added are:

  • Mixed mode syntax highlighting. Supports syntax highlighting for HTML, CSS, Javascript, and XML
  • Responsive UI (though need to work more on this)
  • Brackets matching

I have a lot of plans to be add to this and I believe there are a lot more refactoring to be done but for the meantime, I’ve updated some of the scripts. You are also free to fork and contribute to this. The source code is available at Github 

If you’d like to try it out, you can download it here.