Featured Posts

<< >>

Installing cx_Oracle on a Mac

So as previously mentioned, I got a Macbook Pro. Nearly two months later, I am loving it more and more. The only gripe I had was installing a specific package

jQuery Mortgage Calculator

Today I created a jQuery based mortgage calculator. Nothing to fancy, uses bootstrap for the main page but if you tear apart the code you can abstract it out for

How-To: Fix my Mac VPN DNS resolution

So I assume a lot of people who read my blog are techies (even if you are not feel free to read! This might help you!), but I had a

gChats: Myth of the Genius Programmer

I attended a gChats session hosted by Google at 1871 and they presented a lot of interesting points that can be applied to anyone working on IT projects, and also

jQuery Scientific Calculator

Over the weekend, I created a jQuery based scientific calculator. Same as before, bootstrap and jQuery. Wanna use it? Feel free to pull it out of the source! I even

Google IO 2014 Here I Come!

So thanks to an awesome individual, I got a invite code to Google IO 2014! Booked my flight, booked my (EXPENSIVE) Hotel, and got all my bags packed. Looking forward to stepping a bit outside my comfort zone and focus on my development skills more.

Looking forward to learning more on the Chrome side and also picking up some more info on the wearables. Thinking the Moto 360 and/or LG G watch are gonna be hot coming this fall. Once Apple lets their iWatch out, this is going to be big. We just need to wait and see.

Wish me luck, hope to learn a lot!

PyCon Day 4/5: The Synopsis

So…about those daily posts. :) As you know, the blog life can be sometimes hard. I have been too busy learning and meeting some awesome people.

Day 2 (Saturday of Testing and Best Practices)

Keynote:

Great talk about getting Python into schools. Its just there for the taking! Very nice Keynote for the day. It was given by Jessica McKellar, and I even got to meet her! Very nice person, and I got a signed Twisted O’Reilly book! :)


Introduction to Docker

I think I am officially in love with Docker. Create images to make containers. These containers are not VMs but essentially spin up and just run. Much faster to run and very compressed. Also you can make containers as images and even use them as deployment mechanisms! Definately something I am going to look into!

So you want to build an API?

It was very flask heavy, was hoping for more generic based talk. It was pretty good none the less.

Getting Started Testing

Yes. Yes. Yes. Test. Test. Test. One of the best talks of the afternoon. Can’t wait to add some test cases for my code. Even covered some mocks testing too!

REST is not enough: Push notifications for Android and iOS

Gave a good overview of what one might do to get started with Android and iOS. Good news. Tons of support in Python! :D

In Depth PDB

Very solid talk and highly recommended. Stop using the darn print statement already! :)

Python Packaging simplified

Good talk about packaging your app for the world.

Its Dangerous to Go Alone: Battling Imposter Syndrome

I will admit. For a while I hit a wall. I burned out. I was experiencing imposter syndrome. There I said it. This was an excellent talk for anyone out there trying to get better and feel good about coding. Don’t listen to anyone else, go and be the best you can be. Stop telling yourself you aren’t good enough. You may not understand something…yet. :D Great talk and 100% recommend.

 

Day 3 (final day):

KeyNote:

Guido essentially had a txt file with a list of titles. He basically live coded a simple little script and had his talk on random topics. Quite fun, and kind of laid back….the most important thing:

download

 

Time to move to Python 3! Its official! Go out and help y’all! Also become a member of the PSF and join our awesome community!

Deliver your Software in An Envelope

Hitchhikers Guide to Open Source

Very fast paced talk but a feel good talk about committing to open source.

Set your code free: releasing open source code

Very nice presentation that really helped me structure my project. Ran through everything step by step, from License to Testing! :)

And that concluded the regular event! Wow that was a quick 7 days! I officially leave later today but just an amazing experience once again. Met a lot of smart and super talented individuals, and got to hang out and have fun with some great people too. I can’t wait til 2015! :)

PyCon 2014 Day 3: The big day is here!

So I apologize right now, if you consider these blog posts too much! I don’t usually get much time to write some blog posts but I thought I would share some great talks and my notes on a few of them.

Today, was the “official” first day of PyCon with some awesome Keynote speakers and also big talks. Again, this is my first PyCon so I was a bit new to talk tracks. However, I think I found all of the talks interesting that I attended :)

KeyNote

The main keynote was given by John Perry Barlow and it was a fun and pleasurable talk about privacy and policy. Had me chuckling, and at times made some very good points. Talked about how we should have a lack of secrecy, and how we should not be afraid about large controlled corporations. Nice talk to listen too.

Computer Science Fundamentals for Self-Taught Programmers

Took this talk to get a grip of the big O notation as that has been one of my bigger weaknesses when it comes to programming. Big O notation (O(n)) is a way developers talk about the theoretical measure of the execution of an algorithm. At the end of a day, algorithm is just a fancy way of saying a recipe (a step by step guide on how to do something). While big O notation is very important, for really small sample sizes, it can not just matter. Always remember that theoretical speed is different than practical speed. In short, unless you are coding for large datasets this is probably not going to make your app faster. With all this being said it is still something you should be familiar with because it allows you to discuss your code in an organized format with other developers. I still need some work in this domain regardless but I honestly just need to refocus because I was able to do this roughly a year ago. That’s what happens when you don’t hone your craft! :)

So you want to be a full stack developer?

This talk briefly touched a ton of tools available for a full stack setup. I consider myself a full stack developer in that all (almost all) of my code is essentially written and maintained by me from beginning to end. This talk was useful not in the sense of planning, but finding out what is out there in the world! I got a list, and I am not going to bore you with a long winded list, but if you wish. Please reach out and I can share!

Python Web Scraping Showdown

In a short demo, @kjam, talked about different web scraping utilities in Python and how they differ in speed. In short, lxml with xpath was the fastest, lxml with css was a close second, and finally BeautifulSoup came in last. With that being said, at the end of the day, the results weren’t that much different. I would say, use what is easiest to read and understand.

Link: https://github.com/kjam/python-web-scraping-tutorial

Ansible – Python Powered Automation  #3

Things I like about Ansible:

  • Agentless (no remote resources used)
  • Keeps things simple
  • Auditable
  • Batteries are included (Close to 250 plugins in core)

I think the only issue I see is that we have committed to puppet and salt, but I definitely don’t disregard Ansible as a powerful tool. In fact, it may become a leader in this domain. It has BLOWN up on Github in the past year.

Puppet Modules: Apps for Ops  #2

I attended this talk to see if there were any gotchas in our setup. I use puppet at the moment, but I think I was recently won over by Salt. :)

Link: https://speakerdeck.com/jbronn/puppet-modules-apps-for-ops

Getting Started with SaltStack  #1

I recently fell in love with salt after the heartbleed mess in the past week. I was tasked with finding out all our server config to see what needed to be patched. In a short salt command on our master, I ran the following command and did a complete inventory of our openssl versions:

sudo salt * cmd.run “openssl version” >> out.txt

Aside from this, I like the whole Jinja2 (coming from a django background) and yaml based config files. I also like the level of granularity (haha a pun…go figure :p). I am also interested in their Salt Reactor. Basically you can listen in to events that occur, and “react” to them in a proper fashion. It uses Zeromq implementation which in itself if kind of interesting. I have not read much about it but looks like a cool setup. :D

Link: https://speakerdeck.com/ipmb/getting-started-with-salt

Reactor: http://docs.saltstack.com/en/latest/topics/reactor/

Application Deployment State of the Onion

Watch this video….Fast…and less than 30 minutes. Probably the greatest talk of the day in my book. No nonsense and straight to the point.

Writing Idiomatic Python

I got around to meeting up with Jeff Knupp, author of the book Writing Idiomatic Python, and we had a little meetup in one of the huddle rooms. Discussed a bit about writing a book and some of the challenges, and we got to discuss what it means to be idiomatic. There were a few people who had some comments on some of the idioms of Python, but as Jeff pointed out. The book is not based on his opinion and he might share the same views as someone, but he is simply writing a book about the idioms that are accepted by Python as a whole. Very interesting talk and also got a signed book out of it.

All the PyCon videos and talks can be found at: http://pyvideo.org/category/50/pycon-us-2014

Day 4 recap coming tomorrow night!

PyCon Day 2

Come one, come all to day 2 of my PyCon experience!

Today was a lot more social, got to finally meet-up with @jeffknupp, writer of Writing Idiomatic Python, and a few other individuals including smortaz from reddit (who is from the Microsoft team and wrote the open source Python Tools for Visual Studio!)

In terms of tutorials and talks, I am going to follow the same format as last night. Today on the agenda? Flask and Intermediate Python!

 

Topic: Flask by Example

Speaker: Miguel Grinberg

General Overview:

In short, the speaker went over how to create a sample website like his using only flask and its various add-ons. Coming from a django perspective, this is exactly what I needed. I needed a quick browse over how to create forms, db models, routes, etc. The slides take you step by step from hello world to something pretty solid. Talked a lot of best practices and overall was a great talk! Very fast paced with TONS of information!

Plan:

I want to take this flask knowledge and see if I can improve upon my automation portals that I have created for work. By doing this, I can make faster and more lightweight pages than my existing django setup. I love my django, but I think that at times it can be a tad “overkill.” There are tons of one off scripts I would love to just run from a GUI for end users, and this might help. An avenue for investigation is whether or not I can maintain user session persistence across both implementations (flask and django). I have been tinkering the idea of using redis to maintain a user session that can be referenced in both. Interesting stuff.

Links

 

Topic: Hands On Intermediate Python

Speaker: Matt Harrison

General Overview:

In a very long, and full of content tutorial, Matt covered tons of material ranging from list comprehension, decorators, generators, you name it! Working through examples, talking about real world scenarios, this talk really clicked for me! Nothing really to share other than finally going to start using generators and decorators a lot more now that I understand them. The generator piece is huge as there are tons of code that I could actually improve on.

Plan:

Get better at Python! This talk was awesome and broke a few misconceptions and barriers I had. Sometimes I would look at Python repo’s and be lost in the code. After today, I got some great take aways that I am going to look to take advantage. Time to get those generators and yields going! :D

Links

 

Talk Schedule for Tomorrow:

  • Breakfast!
  • Opening Keynote
  • Break!
  • Computer Science for self taught programmers
  • So You want to be a full stack dev?
  • Import-ant decisions -or- Python Scraping Showdown
  • Lunch!
  • Ansible -or- Twisted
  • Puppet Modules
  • Getting Started with SaltStack
  • Break!
  • Distributed Computing -or- App Deployment
  • External Talk: Writing Idiomatic Python
  • Lightning Talks!

Hello Montreal! PyCon 2014 underway!

So as many of you know I went to Montreal to attend PyCon 2014! As a up and coming “Pythonista,” this is very exciting. This is the first time I have travelled internationally, and also this is my first “major” conference! Looking to take in as much information as possible in these seven short days. Overall, Montreal is a great city. Everyone thus far is very nice, helpful, and understanding; despite my ability to speak the native tongue French. The weather is similar to that of Chicago, so not much to complain there :)

In terms of tutorials, I have attended the following thus far. I will give a title, a general overview, how I might apply it, and general reference links. I believe all the talks are recorded, I will share this as soon as I find out more information.

 

Topic: mrjob: Snakes on a Hadoop

Speaker: Jim Blomo

General Overview:

Essentially we walked through various examples, talking about MapReduce functions. We talked about how to orchestrate our logs in a manner that provides as much information in a single line vs multiple lines; Makes writing your jobs SO much easier. Essentially, Map and Reduce should be stateless; we are looking at an individual log line at a time, and the framework will merge values back together.

Essentially:

  • map(key1,value) -> list[key2,value2]
  • reduce(key2, list[value2]) -> list[value3]

We didn’t work with a direct Hadoop instance, but rather we worked in a simulated mode, where we had all the data locally. This was smart due to the possible instability of the wifi. (which if I might add has been kick ass! Great job PyCon team!) We worked through simple page visit MapReduce, to more complex multi step MapReduce jobs (get a list of users and their businesses reviewed, and convert it back to a match users together based on Jaccard Similarity). At the end, Jim talked about how to hook it up to a AWS instance of Hadoop and how to properly schedule your jobs. The nice advantage to AWS is that its easily scalable and takes a lot of the heavy lifting of getting Hadoop setup off your plate. Also if you need to spin up extra nodes, its just a nominal fee instead of having to possibly re architecture your own. Probably the biggest talk of the day for me because I am in a position to get more comfortable with Hadoop now. Before it just looked like a big scary elephant :)

Plan:

Now while I don’t have TB of data on my personal machine….there are tons of big data possibilities at work! Looking to see if I can take some of this back to the office, and write some MapReduce jobs on a lot of our data logs. With all this being said, the more efficient your logs are the better results you can get (or at least the easier it is to interpret). So I think this is going to become a bigger project soon. Glad I took this course. Very informative and broke the initial “scary” barrier of big data. BRING IT ON!

Links:

 

Topic: Build your own PiDoorbell!

Speakers: http://www.codechix.org/

General Overview:

In short, we took a Raspberry Pi (a small microcomputer) and wired it to a breadboard using the GPIO pins on the board. By doing this, we can have all sorts of fun with the circuits and program some cool things. We setup some sample led’s, but I finally got the Pi to snap this picture! :)

visitor-photo-2014:4:9-19:52

Plan:

So I plan on installing my PiDoorbell on my home’s door whenever someone gets closer than 24 inches away. This will allow me to snap and view a video stream of who is at the door before I get my lazy butt off my third floor apartment. (Remember, developers are supposed to be lazy ;)) The implementation in class only took a phone, and uploaded to Dropbox and set a SMS via Twilio. My plan is to tweak it to use the Google Drive API, and continue to get SMS or at least email alerts to my phone. This way, I can see when packages are delivered, or stolen O_O, even when I am not home. Long term, I want to add some way to interface with the person at the door; LED bar saying “I am on my way.” or “GO AWAY!” :)

Links:

 

Anyways that’s all I got for now! Looking forward to tomorrow’s tutorials on Flask and Intermediate Python! As always, learning all the time :)

Featured on ThinkChicago!

Last year, I applied (along with 600 others) and I was one of the lucky 100 selected to participate in the City of Chicago’s ThinkChicago program. This is a program that takes young entrepreneurs and technologists around the city; showing off its awesome tech scene, the various companies in the city, and gave great talks about starting your own business.

Overall, it was probably one of the best weekends I participated in because I got to meet some amazing and very talented people and I also got see my beautiful city in all its technological glory. Chicago is still young in terms of technology, but it is quickly evolving. On top of it all, the program also provided passes and an exclusive look behind Lollapalooza! It was quite an experience and I recommend anyone reading this that is still a student to apply! I promise it will be one to remember! I have added links below to find more info you are interested :)

Recently, I was told that I would be featured on the main page of the new website! This is truly an honor, and very cool to be on the official page where other prospective students may apply. As always, anytime I can make my city better, I go for it! Check it out at the link below and let me know what you think! :)

think-chicago-headline

Link: http://www.thinkchicago.net/

Apply Link:http://apply.thinkchicago.net/

Original Article: http://goo.gl/fgcuSL

Skype! Stop using my port 80!

So this weekend, I decided to spend some time on my Windows machine and do some work. Per the usual, I booted up as normal and tried to start up my web server…until I saw this:

nginx-error

So I got to my usual checking around and saw nothing out of the ordinary. I then proceeded to check what was eating up port 80 on my machine!

netstat -ano |find /i "listening"|find /i ":80"

Something was already running? On port 80? What could this be? So I looked it up via the tasklist command:

tasklist /FI “PID eq 4000″

and saw the culprit….Skype? This can’t be right… After doing some quick browsing…this is intended. The reason Skype has this enabled is so they can bypass some firewalls and such. Blah! So in short there is a solution, oddly enough it is so common that it is even documented by Skype! Well, to fix this issue, just go to Skype>>Tools>>Options. Next, go to Advanced>>Connection and uncheck that box; “Use port 80 and 443 as alternatives…”! After this you will be good to go! Hope this helps someone else in the world :)

skype-error

How-To: Fix my Mac VPN DNS resolution

So I assume a lot of people who read my blog are techies (even if you are not feel free to read! This might help you!), but I had a rather odd issue with my Cisco VPN client and my Mac. It appears that I would be able to access my servers via their IPs no problem; why I know my servers by IP is a maddening thing, don’t ask. However, whenever I tried to reach my servers via their hostname, my Mac would just flat out reject it. It would sometimes auto correct itself, but I am in the tech field! I am spoiled by having the world at my fingertips, and want my information now! So after much browsing, I found a solution from my coworker vijay360!

sudo launchctl unload -w /System/Library/LaunchDaemons/com.apple.mDNSResponder.plist

sudo launchctl load -w /System/Library/LaunchDaemons/com.apple.mDNSResponder.plist

Basically, doing the above resets your Mac’s DNS :) In short, for the non-techies out there, DNS is just a fancy way of saying what an IP should resolve to. For example, the internet would be a dark and scary place if http://google.com was only accessible via: http://64.233.160.19 . DNS helps you as a human be able to enter google.com and have the computer (and the internet) translate that for you! The story behind DNS is very simple, yet some facts about it are truly awesome and unbelievable. More on this soon :)

Hope this helps someone out there!

Original Source: http://vijay360.wordpress.com

Fixing SSL Errors routing to localhost

So over the course of the weekend, I was maintaining an application that essentially redirected all http traffic to https back to itself. Normally this wasn’t an issue but the application was being stubborn and tossing sslcert issues.

At first, I said, Ah ha! Must be a cert issue. Took the time, certs were ok.

Next, I said, oh must be a routing issue! Nope, I saw all the traffic coming and going. I saw NO traffic at all for this bad request. This had me thinking…what if it never needs to touch my network at all?

What was going on? Turns out the server was missing a self signed localhost ssl cert.

In short running:

openssl req -new -x509 -newkey rsa:2048 -keyout /etc/pki/tls/private/localhost.key -nodes -days 3650 -out /etc/pki/tls/certs/localhost.crt

fixed my issues.

With all this being said, there are some issues with running your own self signed certs, but normally by that time the actual machine has already been compromised. A good read is linked below! Happy Saturday all!

http://security.stackexchange.com/questions/35033/what-are-the-risks-of-a-localhost-signed-cerificate

Unexpected Advice From Terry Crews

So a while back (almost a year now), I saw that Terry Crews did an AMA (for those unfamiliar AMA stands for Ask Me Anything) on reddit. I decided to contribute to the pool of questions, despite the fact he may never see my question. I carried on my day and did my usual routine at the time; go to school, go to my then internship, go home, go to the gym, restart. However, before I went to sleep I decided to check my guilty pleasure of reddit one more time and was surprised to see that my comment karma shot through the roof. Looking closely, I saw that Terry Crews actually responded back to me! Reading his comment, it instantly became a classic quote for me. So I thought I would share:

Screen Shot 2014-03-17 at 1.23.27 AM

“Never stop being YOU. I am out to be the best ME I can be. Do what you LOVE and you will be badass.”

Happy Saint Paddy’s Day friends!