Skip to main content

Posts

Cool Python Tricks

Print Append Using print to append string to file file = open('path/to/file','a+') print >> file, 'string to append' print >> file, 'another string' If you check your file you should have string to append another string Dictionary Functions Map functions in python dictionary def doThis(): print 'this' def doThat(): print 'that' def doThose(string): print string func_dict = { 'this':doThis, 'that':doThat, 'those':doThose } func_dict['this'] #prints this func_dict['that'] #prints that func_dict['those']('Python is cool') #prints Python is cool More to come...

Job Interviews

I had a job interview today. Man it was rough. I forgot to brush up on my skills and knowledge in computer science and tried to wing the interview. Bad idea. Even though I felt I answered most of the questions decently, it was still very challenging. I bet those guys thought I was an idiot. [+]A note to anyone who is thinking about or about to get an interview for a programming job. Make sure you know about data structures, algorithms, efficiencies of data structures, linked list vs arrays(not dynamic), sql statements such as joins and why NULLS are bad in tables. If you list a programming language be prepared to answer some questions about it. I thought I knew a lot about python. Turns out I was still not too knowledgeable about the simplest stuff.  This was quite the experience but I think for my next interview I will go in more prepared.

Mobile App UI Mockup

Here is a mock up on the UI I want to "try" for my application. Enjoy. Download link on request.

Jython Set Look and Feel

Here is a code snippet to add look and feel using java's UIManager in jython. Add this snippet to your code and then reference it in your class __init__ function.                                                       Example from javax.swing import UIManager class App:                                                            def __init__(self):         setTheme("Nimbus") #If none specified it uses default LAF         #...Rest of code #ADD THIS FUNCTION   def setTheme(theme=None):                                               ...
A custom 404_page I made for my website.

Community Service Site WIP

A snapshot of my senior capstone project. Getting ready to launch it into alpha tests soon. I used the Django web framework.