Friday, May 17, 2013

DRY up your WET clothes


As a novice web developer, I always tend to code stuff up, see if it works, and proceed when it does. Then back to step one. I think most developers went through just that at one point or another. Problem with this whole “going back to step one” phase is that I tend to code stuff up, again, from step one. What is good about this practice is that it is really easy for a newbie to trace back his steps when he sees numbers and jumbled symbols instead of words. With the simple stuff that most newbie developers do, it won’t be much of a burden to the server anyway if he continues this WET, write-everything-twice, (or more, for that matter) Principle. Packing as much experience as I do have now (definitely not that much), it is very much clear that this is a bad practice. Actually, “bad” is an understatement. Codes come in bits and bytes. Loading them requires bandwidth. Everything else is simple math: 1 byte is easier and faster to load than 2 bytes.

And along comes Django.

Django has this particular tenet concerning code repetition: the DRY, don’t-repeat-yourself, principle. Why is it that important? It’s basically this: if you can kill two birds with one stone, why bring two stones in the first place? Efficiency is key. And working with Django over the past month taught me just that: to always bring a single stone.

If it does the same thing, it only needs to exist once in the system. If you ever feel the need to edit a specific entry, you only edit one entry. If you need to delete a specific entry, a single stone will suffice.

I once read somewhere that the Y2K bug was caused by the violation of this fundamental rule.

WET coding may be a hard habit to break but the advantages of DRY coding simply outweighs the former. And if DRY isn’t a cool enough acronym for you, try this: DIE (Duplication is Evil)

Ciao.

Saturday, May 11, 2013

Python Code Camp



In line with our commitment to support the developer community in Davao, Ingenuity has partnered with DevCon, the non-profit organization that aims to promote the "IT Pinoy Talent", in bringing a series of developer workshops called 'Python Code Camp'.  

Designed to help developers learn from fellow developers, the community event will start on May 18 with the  first seminar/workshop titled 'Taming the Snake'.  This one-day introductory seminar aims to introduce and promote the Python programming language to the local software developers in the Davao region.  A "mini-hackathon" will be held, where participants showcase what they've learned by presenting their working prototypes.

Python, is an easy-to learn, high-level computer language that is used in many of the most popular tech startups and companies today like Google, Dropbox, Instagram, Pinterest, SlideShare, Asana, and Path, among many others.


Ingenuity, recognized as Python specialists in the IT industry, will field 4-5 team members as speakers, and help facilitate the event.

This is a FREE event, and all interested software developers of Davao are welcome to attend.

Check this link for more info: http://devcon.ph/events/devcon-python-code-camp-taming-the-snake

Thursday, May 9, 2013

The Unseen Ninjas

The third week of internship is welcomed with the Themed Mondays. Prior to that day, we were informed that the theme was going to be POP CULTURE ICON. Over the weekend, we made ourselves busy by planning on what to prepare.


Masks were all around since that is the lightest thing to carry. To participate, my co-interns and I decided to wear Jabbawockeez Masks. Some of us continued wearing those masks while working. Having those kinds of activities is a simple, yet a cool way to break away from the strains brought by the project development.

JabbaGeorgi :)
The day had been full of surprises. Before it was ended, we were introduced to telecommute. Telecommute is a working paradigm that allow us to work remotely. We are aware that it is a window of opportunity to suspend working with the project; however, we are also mindful to our commitments and responsibilities.

We were allowed to work outside the office from Tuesday to Thursday, and were required to report on Friday for the presentation of the updates of the project. To keep track and to ensure that we were working with the project, we were required to be online on Skype.

Telecommute is what I really need for that week since I’m not feeling well. With this, it allowed me to work with our project comfortably. This also made the working process faster since we found our own ways to have access on some of the online resources.

When we reported to the office and presented the updates, we welcomed all the insights and reactions from everybody. From those constructive criticisms, we learned a lot of things that can help us to improve our projects.

As a conclusion, third week taught us not only to develop our programming and web development skills, but also to develop the attitude to become good programmers and web developers. Telecommute demands nothing but responsibility in the commitment you are committed with. As what Ma’am Ghea had posted “…It [Telecommute] takes a certain amount of self-discipline and an enormous bucket of professionalism…”.

Django and Social Login


Logging in or registering has always been a tedious process for some people. You go through a lot of questions, fill up a lot of blanks, and get more security validations just to even check if you really are human. Sometimes you just want to quit the whole thing and move on with your life.

So how can we make logging in and registering easier?

Say hello to “Social Login”.



Social login is a form of single sign-on using existing login information from social networking services such as Facebook, twitter, and other more to create a new login account specifically for a specific website (Wikipedia).

Millions of users are on these massive social networks, so having this kind of system can really help a lot on your website. Since everyone is using these social networking sites, why not utilize the use of it.

With just one click, your users are already in and registered on your website. Cool isn't it? :D

But how can we use this social login in our django projects?

Worry no more cause Django also offers this kind of authentications and authorizations for your projects.  There are different social authentication and registration packages that you can try, and one of these is django-social-auth by omab.

Django Social Auth is an easy way to setup social authentication and authorization mechanism for django projects. This is what I used for our project and I can really say that it is really easy to use.

It also has a good documentation that you can read.

You can view it here:


If you want to read more about django social auth you can visit it here: 


So do you want to have those shiny “log in with” buttons on your registration and log in pages? Try these out now for a hassle-free log in experience!

Wednesday, May 8, 2013

Painting the Roses Red



that moment when everything goes south
when all your plans wasted
when your code breaks
when everything fails
that exact moment at the brink when you realize them
when you think of ideas to resolve them
when you doubt these ideas
and you think too far back into the future
imagining the ideas to once again break
to find the best of ideas and finding none at the moment
you realize that the only thing to do is find the quickest of solutions
NINJA your way out
paint the roses red
and hope to the higher beings that it won’t break as of the moment
so the clients wouldn’t see
so that the pissed off people wouldn’t be pissed off some more
be resourceful, that’s what people do
and then after you do paint the roses red, find a better solution
it can only take you so far
or it's off with your head