Posts

Why Python?

A lot of people asked me this when I told them that I'd always prefer to use python whenever possible. The answer is: For me it is the language that is elegant, very readable, easy to use and learn and it has limitless potentials. I can develop more things after using it for 2 years compared to what I can develop after using PHP for more than 5 years. I'm not saying that the other languages are not good and that python is the best. All I'm saying is that it's the language that fits me best, makes me happy and performed accordingly to my expectation. For other uses I'd use other language as the right tool for the right job. What's your preferred programming language? Why? regards -E- follow  @femmerling on twitter. I recently revamped my website after 2 years. Visit http://www.emfeld.com if you have time

Creating Python Virtual Environment Without Installing To The System

When you develop projects in python, you often met the situation where you will need to install various packages that will clutter the general python installation in your system. Usually people will use the famous virtualenv. However, it often brings trouble when you have to run 2 or more python environments simultaneously. I'm about to share a simple trick that you can use to separate those environment, still using virtualenv but we're using it differently. The examples are in unix/linux, but the usage is quite similar in windows. First, download virtualenv.py from  https://raw.github.com/pypa/virtualenv/master/virtualenv.py . That should be done in seconds. Next up, create any folder where ever you want to create the virtual environment and copy the downloaded virtualenv.py  file inside the folder. Now, run the following command: python virtualenv.py env That will create a folder called env inside your current folder and the folder will contain your newly created...

LDAP Login Authentication Using Python LDAP

About 2 days ago, I have to create an app for internal company use. I'm using EmeraldBox to develop it. At first I created the user model to save user credentials and using it during the login process. However, the boss came with an idea that I should use LDAP login since we have it and it provides a single sign-on solution, which is better. So, I googled around and found python-ldap . You can easily install it by running: pip install python-ldap and it's ready to use. The question is, how can I use it? Check out the code I use below for references. The steps should be the same. However, you need to adjust some values accordingly to the LDAP settings in the server. It's as easy as that and you can perform login and get the user credentials. In my app, I use Flask's session to put the user credentials so I can fetch it whenever I need to. Feel free to use my code. Happy hacking!!! regards -E-

EmeraldBox: My New Boilerplate Python Framework And A Mini Tutorial

I believe that developing web apps should be done in the easiest and most efficient ways. Python offers that. However, most of the available frameworks required a deep learning curve for new users and most users have problems deploying the web app. After using several python web frameworks as well as using other languages' frameworks like Rails, Django, CodeIgniter and Zend over the years, I came to a conclusion that python is the easiest and most efficient language. However, it will require tools that may speed up development. It that sense, Rails has a very good approach and will be implemented for the helper tools. Integration with 3rd party packages should also comes easily without having the need to interfere with the main OS, hence comes virtualenv. Thus, comes EmeraldBox, an easy-to-use, light-weight, and easy-to-deploy framework. EmeraldBox comes in a localized environment and includes standard packages that are commonly used in web development. The tool includes f...

Sleeping Child

I enjoy waking up at night, glancing at my children in their sleep.  They both look so peaceful. It is the best feeling in the world, simply because they can truly enjoy their sleep. They can sleep without a burden in their mind. Without worry and fear. And most importantly, they smile in their sleep because their hearts are smiling. I want that again. I want to be able to sleep like my children. Without fear or worry or thoughts. Just a nice sleep. regards -E- follow @femmerling on twitter

Random Pics From Jakarta

Image
Below are some pictures taken around Jakarta. Enjoy! Senayan area from the 24th floor, you can actually see most of Jakarta West Jakarta from a hospital balcony The "Pemuda" statue, for me it looks more like a man carrying a burning pizza a puncher in the 24th floor Indonesian venice? Dream on... A mid-city golf course on the making traditional fish market about to land in Jakarta All my works are available in my instagram account @femmerling. Feel free to use any of the above pics but please put a link back to my blog. regards -E- follow @femmerling on twitter

Indonesian Nature Pics

Image
After getting an android phone the NASA hackathon back in april, I suddenly turn into a so-called-amateur-photographer. Photography has always been an interest. Add a tiny app called Instagram  and you got some photo filter magic. Below are some of my nature photo collections. Enjoy!!! a broken boat sunrise in the Gulf of Jakarta fishermen harbour morning sky a lonely tree fish pond bridge to your dream seaside fish pond Gedong Songo ruins, Ambarawa, Central Java, Indonesia sulfur cave, Baturaden, Purwokerto, Central Java, Indonesia one of the nine Gedong Songo temples, Ambarawa, Central Java, Indonesia my backyard a plane in the sky afternoon seaside talks Kamal Muara fishermen harbour the Frangipani and the pagoda All my works are available in my instagram account @femmerling. Feel free to use any of the above pics but please put a link back to my blog. regards -E- follow @femmerling on t...