Friday, October 10, 2014

Dev Club Weekly: Moes!

This week we went to Moes!

Topics of conversation included:
See everyone next week!

Friday, September 19, 2014

Dev Club Weekly

The First Helpathon.

We decided last week to try an experiment: come to Dev Club with a project (or some enthusiasm) and spend the 2 hours writing code. If you need help - there's a room full of nerds ready to jump in. If you want to chat - chat. If you don't - don't.

So Dev Club tonight was that. Which is to say: Dev Club tonight was pretty much like every other Dev Club EXCEPT that there's explicit permission from the start to check out of the conversation (if there is one) and code for a while (or the whole time if you want).

I really enjoyed it. Josh hacked on our share github page. I poked around on a tower-defense game I've been thinking about for a little while. Mostly we talked.

Topics of conversation included:

  • French and Goblin and Lingua Esoterica
  • The Great Leap Forward and tragedy of mixing politics and science
  • Chaos Theory, Lorenz Attractors and Emergent Phenomena
  • Mac vs Linux
  • My dream of functional 2 way data binding in the browser
  • Bootcamps and MOOC certificates
  • The future of The Clubhouse and Augusta
  • Women Who Code: Atlanta
Next Week: Meteor JS! 

See you then.

Friday, September 12, 2014

Dev Club Weekly

This week (our first Dev Club on Friday night) the conversation included:

  • The awesome new clubhouse for the
  • Context-Free-Grammars
  • HTML and CSS in email
  • SQL (dear lord, the SQL)
    • Foreign Keys
    • Cascades
    • Databases as code repositories
  • Hackathons and Helpathons
  • Women Who Code Atlanta

Next week, inspired by Women Who Code: Atlanta, we're going to try an experiment. Instead of a workshop or a hackathon, we're going to have a helpathon. Come with a project in mind, or a thing to add to the helpathon. These things could be any of the following:

  • Enthusiasm
  • Drawing ability
  • Javascript skills
  • Knowledge of Python
  • A desire to learn about code
  • CSS know-how
  • Git experience
  • Snacks
  • Curiosity

you get the idea. There won't be any presentations.  There's no competition. You don't need to already know how to program. If you just want to come and sit in the same room with a few other tech people and poke around on your laptop while they talk about code, or poke on their own laptops - that's totally cool. Zero pressure.

I'll be there to help with Javascript or HTML or CSS or any of a few other technologies. Chad can help with even more than I can. If Fred can come - he's like the helper-in-chief. If you're comfortable helping others with their projects, and they request it - you can be a helpathon helper too.

So next week: an experiment in helping. Nerds Helping Nerds.

Sunday, August 31, 2014

Python: 7 lessons in 7 minutes

  • Python: the 7 ingredients
  • matt = "grumpy" 

  • if matt=='grumpy': 
  •     print("you are "+matt)
  • else:
  •     print("you're not grumpy")

  • dev_club=["luke","matt","albert","chad","james"] 
  • dev_club.append("new person")

  • for person in dev_club:
  •     print(person)

  • def new_person(name):
  •     dev_club.append(name)



Dev Club Weekly: Javascript Functions - Beginner to Advanced

  • Javascript Functions
In the magical world of programming, functions are your spells (and we all need more spells)

Simple Example (Beginner):
  • var x = function (d) {return d;}

Pass in something, and it throws it back to you (reflection spell)
  • x("hello world")  >>> "hello world"

The point is to not have to type as much (be lazy).  Use general functions to save yourself time.

If you are trying to get the computer to sing you "Old McDonald" (polymorph spell)
  • var chorus=function(animal){return "and on that farm he had a " + animal + " e i e i o";}

  • chorus("cow") >>> "and on that farm he had a cow e i e i o"

Arguments (Intermediate):
If you don't actually know how many arguments will be passed to the function, multiple arguments can be referenced using the "arguments" keyword to access a something almost identical to an array ( it's a pseudoarray, just know it's not 'totally' an array like you're used to, but you can loop over it like an array, and look up the edge-cases later), this is available in all functions! (mass polymorph)
  • chorus = function( ) { 
  •     x = "" ;  
  •     for (var i = 0; i < arguments.length; i++) { 
  •         x += " he had a " + arguments[i]  + " e i e i o; } 
  •     return x; 
  •     };

Closures (Intermediate):
Functions are the only real way to isolate variables in Javascript (a 'closure' in the CS lingo)
So there are some crazy hacks (that EVERYONE uses) to encapsulate chunks of code.
  • (function(){var x="something unreachable from the outside world, but usable here.";})()

  • x >>> undefined

call( )apply( ), and bind( ) in Javascript (Advanced):
Sometimes you want to steal a method (function attached to an object) to use on another object. Here's some black magic:

Start with an object:
  • var a={};
Give it some properties:
  • a.width=10;
  • a.height=10;
And a Method (a function attached to an object):
  • a.area=function(){return this.width * this.height;};
That method uses 'this' which refers to the object itself - so in this case this.width is the same as a.width is the same as 10, so when we call area...
  • a.area() >>> 100

Now for the theft!

Another object:
  • var b={};
Same properties:
  • b.width=2;
  • b.height=2;
But no area method, so...
  • b.area() >>> TypeError: undefined is not a function

Use it once:
  • >>> 4
Or steal it completely:
  • b.area=a.area.bind(b);
  • b.area() >>> 4
  • a.area() >>> 100

call( ) and bind( ) reassign 'this' to a new target, so as long as this['property name'] is the same between objects, the methods can be shared.

apply( ) is like call, but you can pass the arguments as an array (if what I just said doesn't make any sense to you: don't worry about it, apply's not that important most of the time). Mostly you can ignore it, except that it lets you do this cool trick. Bear with me for a sec.
  • Math.max(100,200) >>> 200
  • Math.max(3, 4, 5, 8, 9000, 10) >>> 9000
But what if I have this:
  • var d=[1,2,3,200,12,3,4,5,1000];
Behold: Magic!
  • Math.max.apply(null,d) >>> 1000

and that's pretty much all you'll ever use apply( ) for... probably...