Skip to content

Instantly share code, notes, and snippets.

@ben432rew
ben432rew / alt_tild.ahk
Created September 19, 2016 18:23
for switching between windows of same program
/**************************************************************************************************************
title: Thumbnail functions
wrapped by maul.esel
Credits:
- skrommel for example how to show a thumbnail (http://www.autohotkey.com/forum/topic34318.html)
- RaptorOne & IsNull for correcting some mistakes in the code
NOTE:
*This requires Windows Vista or Windows7* (tested on Windows 7)

Loan or No Loan?

Here is some people's last month bank statements. Query the database to answer the questions. Write methods to return all of the information to you. Don't do this manually.

  • How many people are there in the database?
  • What is each persons salary (return their name and salary)?
  • What is each persons net income?
  • How about their highest expense?
  • What percent of their salary did they spend?
@ben432rew
ben432rew / pointers.md
Last active November 12, 2015 23:16
suggestions for ninja gold. it's pretty good as is. just some tips :)

use the right tools

Don't use a try/except clause for checking for a key/value pair and providing a default. Python has .get builtin for this purpose:

# no
		try: 
			session['activities_arr']
		except:
 session['activities_arr'] = []
@ben432rew
ben432rew / Timing.md
Last active November 12, 2015 21:26
Freud Speed results

Notes on speed:

First round, camps_city_loqAL.json:

1:36 to do geolookup for all queries

5:18

def run_validators(self):
    def _run(query):
@ben432rew
ben432rew / curriculum.md
Last active February 22, 2016 04:25
on the grind

Throughout the course:

  • Don't do more than one typing io lesson in a day. you really don't have time for that, even though I know it's fun. Just use it as a reward or something, like 'after I finish this chapter/lesson I'll do my daily lesson'. And never look at the keyboard, learn all the special characters.
  • Take one day off a week from coding. No coding that day.
  • If you don't understand something fully, don't worry too much about it. Just complete whatever you're trying to do and move on. You don't have time to really learn everything, and that's fine. You'll figure it out later, trust me, a lot of things didn't make sense until I just did them a bunch and then was like 'oh yeah I get it now'.
  • All programmers actually do is know how to look things up on google. Seriously, ask any programmer and they'll tell you that. Have the time you spend at work is on google, looking up how to do things. There's a site called stackoverflow.com that you'll become very familiar with, you might as well s