Thursday, November 08, 2012

Øredev 2012, Report from Day One

Software won, so what now? - David Rowan

A healthy disregard for the impossible.

Software developers have the power to make a massive impact. We should do something other than help people pass the time or sell more on the Internet!

We should do this by making it easier for non software developers to write programs. One solution, David believes, is to create new languages, for example DOG!? I don't agree with him that this is a good way forward, Applescript anyone?

The Internet can be used to create greater transparency for government and companies. Some examples

  • I paid a bribe web site.
  • Thank doctors who works without taking bribes.
  • Making transparent elections.
  • TED, Ideas worth spreading.
  • Publicising data to get help with data mining.
  • Random hacks of kindness
  • Education, Udacity, CoderDojo, Rails & Girls
  • Government, Street Bump, Don't Eat At, Open Government API
  • Health, Asthmapolis

Vim, Precision Editing at the Speed of Thought, Drew Neil

We spend a lot more time editing text than inserting text, so it is only appropriate that the keys can be used without modifier keys.

Vim is more like playing a melody than playing a chord.

Targets

The ideal way to move the cursor to the target is to look at the place where you want the cursor to go and it would just go there.

The mouse is very intuitive for finding targets, but it requires precision and breaks your typing flow.

Hunt and Peck is the standard interface in a less capable editor if you are not using the mouse. That means using the arrow keys to find the proper plays, possibly after moving to an area closer to the spot you want first.

Vim provides precision targetting, short commands that allows you to move to the spot you want. An example of this is the f command.

f{char} moves you to the first occurence of of the letter char.

fb moves you to the first b on the line.

Vim also have something called text objects. Text objects are pieces of text delimited by characters such as quotes, parentheses, or tags.

vi{delimiter} Visually selects the text Inside of the delimiter. va{delimiter} Visually selects All the text including the delimiter.

`vi)` selects the text inside the parentheses.
`di)` deletes the text inside the parentheses.

`va"` selects the text and the quote.
`da"` deletes the text and the quote.

Vim allows navigation between files with commands like:

gf to move to the filename under the cursor.

ctags is an external indexing program that allows you to go directly to definition and other navigations common to a lot larger IDEs.

This was a good introductory presentation to Vim, but nothing new for experienced Vimmers.

Software in the Age of Sampling, Brian Foote

Most new software development is really taking sampling and mashups. We take libraries or code snippets that already work and tweak them to work the way we want.

Copy and paste is a really powerful technique to get us started. We all do it all the time.

If you are going to steal, steal from the best

But, when you steal make sure it works by understanding it or putting it under test. Also make sure to add your own style to what you steal to make it fit with your own code base.

What's new in ASP.NET 4.5, Damian Edwards

ASP.NET 4.5 comes with some good stuff built in, OAuth, NuGet, Asset handling, and async support.

OAuth authentication supported with different providers. Supports connecting and disconnecting the local account from the external providers.

Package manager is pre-configured to use NuGet.

Support for concatenation and minification of Javascript via Bundles. Support for precompilation and minification of CSS via external Bundle plugins.

Async

  • Make async handlers by extending HttpTaskAsyncHandler or Forms.Page
  • HttpClient is exclusively async.
  • Task.WhenAll and Task.WhanAny to handle parallel tasks synchronization.
  • CancellationTokens help you cancel many tasks at the same time.

Microsoft has done a good job integrating async into DotNet.

Testing Online Crazy Glue, Chris Hartjes

Testable applications are better!

Chris introduced us to testing PHP. The sad news is that even though PHP is a dynamic language it has to be tested as if it is static.

The good news is that testing static languages is a solved problem. It is solved by tools, strategies, and automation.

  • The tool of choice is PHPUnit.
  • The strategy is dependency injection and mocks.
  • Automation is solved with a simple script, and version control hooks or a CI-server.

It is not hard to do TDD in PHP, the tools are there, use them!

No comments: