Les codes les plus en vogue pour 2013
based on what, though?
On Writing vs coding
I argue that there is an essential set of skills that intersect both with writing words and writing code. Let’s revisit the process:
There’s this thought I want to write.
I have finite set of words, a target audience, and, likely, a certain article length that all serve as constraints.
Writing appears more forgiving because there is no compiler or interpreter catching your its/it’s issues or reminding you of the rules regarding that or which. Here’s the rub:there is a compiler and it’s fucking brutal. It’s your readers. Your readers are far more critical than the Python interpreter. Not only do they care about syntax, but they also want to learn something, and, perhaps, be entertained while all this learning is going down. Success means they keep coming back - failure is a lonely silence. Python is looking pretty sweet now, right?
CODE CREW SUGGESTED READING #2: REGULAR EXPRESSIONS
A regular expression is a pattern that allows you to match (specify and recognize) strings of text like a character, word or pattern of characters.
For example, if I want to search for duplicate telephone numbers in my application I may write a regular expression that matches any non-number character (dashes, parentheses, periods, spaces, etc.) and then write code to strip them from each telephone number so I can compare each phone number as 7 digit strings.
So if my program asks a user for a home phone number and user1 inserts his phone number as “(212) 555-1234” and user2 inserts his phone number as “718-555-1234”, I can use a regular expression to help me write some code to change these inputs to “2125551234” and “7185551234” respectively.
Say, for example, user3 comes along (who happens to be user1’s wife) and inserts her number as “212.555.1234” I can write a regular expression that matches the periods in her number then write code to remove them to convert her number to “2125551234”. My program will now know that user1 and user3 have the same exact number.
Just to summarize:
- The string “(212) 555-1234” is not equal to the string “212.555.1234” because of the parentheses, dashes, periods and spaces
- However, if I write a regular expression to match the parentheses, dashes, periods and spaces and write code to remove them, the two numbers become “2125551234”
- and “2125551234” is equal to “2125551234”
Links to the tutorials are below:
Regular Expressions for Dummies (Screencast)
8 Regular Expressions You Should Know (Text, and pretty useful if you’re building an app)
Let’s be honest: a great many of us are tired of seeing the same old Twitter Bootstrap theme again and again. Black header, giant hero, rounded blue buttons, Helvetica Neue.
Yes, you can customize the header to be a different color, maybe re-color some of the buttons, use a different font….
I’m so far behind I haven’t even used it yet. Pfft! So much to learn! So few bagels to eat! (That last part didn’t make sense. I guess I’m just hungry).
For those of you similarly late to the party, Twitter Bootstrap is a front-end toolkit — that is, a lot of prebuilt parts for the look and feel of an app or website.
"Tesla in a Teapot," Paul Ford
Create the future with SunSaluter and GALAXY Note 10.1
Fascinated by biomimicry, Eden Full aims to power a whole village on SunSaluters — relying on technology that rotates solar panels to follow the sun (just like a sunflower) — by 2013.
“Good technology is something that is simple, something that anyone whether you are 5 years old, a university professor or a farmer in Tanzania, you’d be able to look at it and get it.”
See how the GALAXY Note 10.1 plays a part in creating the future with Eden from SunSaluter. http://bit.ly/R62N6S
Leó Szilárd, from his ten commandments. (via)
“We can’t put this off any longer,” President Obama implored the nation last week as he introduced 23 executive actions designed to reduce gun violence in America. While the United States has the highest level of gun ownership per capita in the world, its rate of gun homicides, about three per 100,000 people, is far lower than that of Honduras, the country with the world’s highest gun homicide rate (roughly 68 gun murders per 100,000 people). But America’s homicide rate varies significantly by city and metro area, as I pointed out here at Cities a few weeks ago.
Colleague Derek Willis writes up how the mobile edition of the US federal government’s annual publication of appointments helped him create a streamlined public JSON dataset, “mak[ing] a profound difference to [a specific Times] article, providing a more complete picture and dramatically reducing research time”.
A Slower Speed of Light is a free little game from the MIT Game Lab. It visually demonstrates the effects of relativity. You move around in the first person picking up orbs which slow down the speed of light—the effect being that your normal walking speed inches ever closer to light speed. When you move faster—or light moves slower—colors begin to morph as the invisible shifts into the visible spectrum, until finally time and space themselves start bending. Very trippy, but based on real physics.
Always excited when science meets gaming!
Pictured: Matt Senate. One of the founders of Sudo Room.
“For many, the term ‘hacking’ still mostly brings to mind negative connotations. ‘It probably got misinterpreted as a negative term for breaking security systems in the Seventies or Eighties,’ Migurski said. But for a long time, the term simply meant ‘finding interesting, weird, or elegant solutions to a problem.’”
That oughta make some interesting data visualizations!
Javaun talks about developing the Codecademy API tutorial for the NPR API. Nifty!