Categories
Uncategorized

Ruby Foo

ruby foo

After three years away from all but the most trivial of noodling with the Ruby programming language, I have become a Ruby Foo (as in Mr. T’s catchphrase, “I pity the foo’!”). I am severely out of practice with Ruby, and with two versions having appeared since I last made a living with Rails, even the act of creating a new project is completely different. Since Ruby is the preferred back-end programming language at Shopify and I am the Platform Evangelist, it’s time for me to “sharpen the saw”.

obie

Luckily for me, I ran into Obie Fernandez at the South by Southwest Interactive conference back in March. We sat down for a coffee and he told me about what was happening with Hashrocket and I told him that I was a hair’s breadth away from joining Shopify.

“I’ve been away from Ruby long enough that I’m probably back at newbie level again,” I told Obie between sips of latte made with overcooked beans. “I did it for a bit at the beginning using IronRuby, but between doing all the C# and PHP and the open source ‘Iron’ languages dying of neglect at Microsoft, I’m severely out of practice. I thinking of joining Shopify, and let’s face it: I don’t want to look like an ignoramus in the presence of rock stars like Tobi, Cody and Edward.”

“Give me your email,” said Obie, “and I can do something to help.” Of course he could – he’s the series editor of Addison-Wesley’s Professional Ruby series of books.

Shortly after South by Southwest, a couple of links to PDF editions appeared in my inbox. Thanks, Obie!

eloquent ruby

The first link was to Eloquent Ruby, Russ Olsen’s guide to speaking idiomatic Ruby and getting the most out of the Ruby programming language. It’s a breezy read, written in the same conversational tone that Olsen used in Design Patterns in Ruby, and the book is broken down into 31 bite-size chapters about a dozen pages in length. Each chapter’s title is some principle for programming eloquent Ruby – the first few are “Write Code That Looks Like Ruby”, “Choose the Right Control Structure” and “Take Advantage of Ruby’s Smart Collections” – and each explains that principle, provides code, shows you where you can find the principles used in actual, working projects. The book straddles the line between tutorial and reference; it’s written in tutorial style, but it’s organized so well that it might as well be a reference for those parts of Ruby that you might not use often (but should) as well as for those parts you keep forgetting (in my case, I always end up having to look up metaprogramming). I’ve been going through it at about a chapter an evening, and I’ve been getting smarter each time. Whether you’re coming back to Ruby after a hiatus like I am or if you just simply want to get better at Ruby, you should have this book in your library.

If you’d like to know more about Eloquent Ruby and its author, Russ Olsen, check out this interview with him at InfoQ.

ruby on rails 3 tutorial

I have yet to properly sink my teeth into Ruby on Rails 3 Tutorial but a quick scan of the book has shown that it’s quite promising, and the Amazon reviews are bolstering my belief.

I’ll be writing from time to time about my return to Ruby and Rails in this “Ruby Foo” series of posts, and I hope that whether you’re new to the language, returning after a break like me or aiming for “guru” status, that you’ll check out this blog regularly for notes on my explorations and what I’ve learned.

This article also appears in the Shopify Technology blog.

Categories
Uncategorized

Manning Deal of the Day: “Natural User Interfaces in .NET” MEAP and Paper Book for $25

Cover of "Natural User Interfaces in .NET"It’s a work in progress, but it’s an important one: Manning Publications’ Natural User Interfaces in .NET, written by Joshua Blake. It’s a primer on creating natiral user interfaces — NUIs — using Microsoft technologies such as WPF 4, Surface 2 and Kinect.

Here’s an excerpt from the publisher’s description:

Natural User Interfaces in .NET is a hands-on guide that prepares you to create natural user interfaces (NUI) and great multi-touch experiences using the WPF and Silverlight multi-touch APIs. This book starts by introducing natural user interface (NUI) design concepts that everyone needs to know. It then quickly moves to the WPF Touch API and Surface Toolkit guiding the reader through a multitouch NUI application from concept to completion. Along the way, you’ll see where these concepts can be extended to Silverlight via its touch interface.

Today only — that’s May 16, 2011 — you can get the MEAP (Manning Early Access Program) preview PDFs, which are updated regularly and the final print edition of the book for a mere USD$25.00 (that’s $24.23 Canadian)! Just enter dotd0516 in the promotional code box when you check out at Manning’s site.

Categories
Uncategorized

This Monday at TechTalksTO: Edward and Daniel from Shopify Talk Open Data!

Edward and Daniel on Open Data

If you’re into Open Data and in the Toronto area on Monday, you’ll want to catch my fellow Shopifolks Edward Ocampo-Gooding and Daniel Beauchamp at TechTalksTO. They’re going to be talking about how you can (and should) write apps that make use of open data — that’s public information that’s been put online in a form that applications that use, crunch and mash up. It’s out there, it’s free, and it’s there for the public good, so get out there and make the most of it!

Here’s the description of the event:

  • Wondering what your next big project should be?
  • Need some ideas for new and innovative features?

Work on something that matters. You’re bright and hungry to sink your teeth into using new tech all the time. Instead of making yet another X, build something for yourself and for your neighbours & city. Do it with open data: public records now online in an easily hackable form.

Edward and Daniel will talk about how making cool and interesting art & tools backed by open data has catapulted Ottawa hackers into the limelight with coverage & support from the City of Ottawa, CBC, newspapers, local radio and TV stations, and a *lot* of citizens. We’ll show you what’s worked for us, what the scene is like and how you can make open data work for you in your city.

Edward Ocampo-Gooding’s awesome titles include Developer Advocate at Shopify (talk to me about APIs and apps) and lead Organizer at Open Data Ottawa (talk to me about APIs and apps). Daniel Beauchamp is a developer at Shopify and one of the core members of Open Data Ottawa. Along with Edward, he has given several talks on open data, and has recently helped organize a hackfest spanning 76 cities worldwide.

Edward and Daniel’s TechTalk takes place this Monday, May 9th from 6:45 p.m. – 9:00 p.m. at the Gladstone Hotel (1214 Queen Street West, just east of Dufferin). Admission is $3.00 (free for students) and if you want to attend, you need to register here.

Categories
Uncategorized

Two New Books for Windows Phone 7 Developers

Free Ebook: Programming Windows Phone 7

Cover of "Programming Windows Phone 7"

Charles Petzold literally wrote the book on Windows development, and he’s now doing it for Windows Phone 7. Programming Windows Phone 7 is published by Microsoft Press and covers Windows Phone 7 development from many angles: building apps with Silverlight, making games with XNA and making your programs even better by accessing online services.

Windows Phone is a lot of ground to cover, so the book is sized to match. Petzold’s been working on it since at least the start of the year and it shows – it’s over 1,000 pages on our favourite mobile operating system! Luckily, this book is free-as-in-beer: that’s right, you can download it in ebook form, along with the sample code, for no money at all. If you’re looking to seriously get into Windows Phone 7 development, you should have this book.

Downloads for Programming Windows Phone 7

XNA 4.0 Game Development by Example

Cover of "XNA 4.0 Game Development by Example"

Survey after survey shows that games are the most popular mobile phone apps, and Windows Phone is really good at games, and not just from the user’s point of view. The XNA framework, available to Windows Phone developers, takes Windows Phone 7 beyond mere informational apps – it’s like having an Xbox in your pocket!

XNA is also more than just about Windows Phone – it’s also for developing games for Windows and the Xbox 360. Better still, it lets you target three platforms – desktop, console and phone – with a single codebase and tweaks specifically for each platform. If you want to write games and reach a wide audience, XNA is your ticket.

Packt Publishing’s XNA 4.0 Game Development by Example is a great way to get started with XNA programming. It walks you through the development of four games, each from a different genre:

  • Flood Control, a timed puzzle game where you have to quickly assemble pipes before time runs out and water flows through them
  • Asteroid Belt Assault, a 2-D shooter that classic 80’s arcade gamers will find familiar
  • Robot Rampage, a tank game featuring multi-axis controls, a scrolling world, particle effects and enemy AI
  • Gemstone Hunter, which takes the Platformer Starter Kit to new levels

I just got the book, and have only done the most cursory of scans, but I’ve already picked up a few ideas for how to implement features in my games. If you’re looking to do game development for Windows Phone and beyond, this is a great starter book!

Get XNA 4.0 Game Development by Example

This article also appears in Canadian Developer Connection.

Categories
Uncategorized

Intel/Microsoft Parallel Programming One-Day Course: September 20th in Montreal

Xzibit: "Yo dawg, I heard you liked processors, so we put processors in your processor so you can process while you process!"(If you don’t get the joke, here’s a little explanation.)

Moore’s Law isn’t dead; it just ended up taking on a new form. Named after Intel co-founder Gordon Moore, it refers to the observation that for the same amount of money, the number of transistors that can be place on a chip would double every 18 months. Moore described this trend in 1965 and expected it would continue for at least a decade; it’s held true for almost 50 years.

For a while, this doubling of transistors translated into a doubling of processor speed. We entered the 1990s with 286 processors running at about 10 MHz and left the decade with chips closing in on the 1 Ghz mark. But we didn’t get that hundredfold speed increase in the following decade; those extra transistors became multiple cores, so instead of speed, we got parallel processing engines.

To take advantage of these cores and get the speed increases that we’d grown accustomed to, it’s going to take parallel programming. It’s tricky to get right, and I have personally ruined some good programs with some bad threads, and you might have too. That’s what Parallelism Techdays (no relation to the TechDays conferences we’re putting on across Canada) are all about.

Parallelism TechDays: Developers -- Learn from Intel and Microsoft - Free 1-day course on parallelism and threading

Parallelism Techdays is a FREE one-day course taught by Microsoft and Intel where you’ll learn about parallelism and threading. This is your chance to learn about threading your applications for multi-core platforms.

This course is aimed specifically at Windows C++ programmers using Visual Studio. You don’t need to be familiar with threads, but it’ll help. If you’ve got beginning to intermediate experience with threads in C++, this course is for you!

Here’s the agenda for the day:

  • Thinking in Parallel
    • Why go parallel?
    • Types of parallelism
    • Task-based parallelism vs. traditional methods
  • Getting Started with Parallelism
    • Approaches to converting serial code to parallel
    • Approaches to creating parallel code from scratch
    • Intel Parallel Advisor with test application
  • Implementing Parallelism
    • Choosing a parallelism environment
    • Reasons we will focus on Intel TBB/Microsoft PPL in this class
    • Overview of TBB/PPL
  • Debugging and Correctness (Introduction)
    • Overview of special bugs and parallel programs (deadlocks, data races)
    • Debugging a parallel program (demos of Microsoft Visual Studio 2010)
    • Correction of data races (demo of Intel Parallel Inspector)
    • General guidelines for parallel processing
  • Tuning
    • Understanding parallel performance
    • Performance tuning process
    • Demos: Intel Parallel Amplifier, Microsoft Visual Studio 2010
    • General strategies for solving parallel performance issues

The course starts at 9:00am and concludes at 4:00pm, with 6 hours of instructional time, plus breaks and lunch. Register now – the Montreal event is happening soon!

This article also appears in Canadian Developer Connection.

Categories
Uncategorized

Get “Silverlight 4 in Action” for Half Price!

silverlight 4 in actionToday only (Friday, September 10, 2010), you can get either a PDF or dead-tree edition of Silverlight 4 in Action for half price! Just enter the discount code dotd0910 in the promotional code box when you check out at Manning Publications’ online store.

Here’s the publisher’s description of the book:

Silverlight gives you entirely new ways to create rich internet applications, and now Silverlight 4 adds many powerful enhancements to the mix.

Silverlight 4 in Action is a comprehensive guide to application building using C#. It goes into action immediately in a thorough introduction. It then follows up with numerous nifty examples to explore flexible layout, control extensibility, the communication and binding models, rich media, animation, and much more.

This book explores practical questions in patterns, testing, and performance optimization throughout. No previous experience with Silverlight is required.

Remember, it’s half price just for today! With the discount, the ebook edition becomes USD$14.99 and the paper book version (which also gives you the ebook edition) drops to USD$24.99.

This article also appears in Canadian Developer Connection.

Categories
Uncategorized

Windows Phone-a-Palooza [Updated]

Update: Please note the changes to the Toronto-area deployment clinic locations!

The "Windows Phone Canada" LinkedIn Group

"I [Canada] Windows Phone" logo

If you’re not a member of LinkedIn, the social networking site for professionals, you should join it now! It’s a great place to keep in touch with your network of working peers, post and maintain your resume, find people in your industry and be found yourself, and take part in professional discussions in LinkedIn groups.

Once you’re a member of LinkedIn, you should join the Windows Phone Canada group. It’ll have links to the latest Windows Phone articles, host discussions about all aspects of Windows Phone development, from coming up with ideas for apps to writing them to selling them in Marketplace. You’ll also get to network with Windows Phone developers across Canada, and as I’ll tell you over and over, that’s where opportunities are born.

Join the WP7 discussion – join the Windows Phone Canada LinkedIn group!

Windows Phone Deployment Clinics

7 LG Windows Phone 7 phones charging

Pictured above: some of the phones we’ll be using in our deployment clinics.

Anyone who’s built apps and tried them out on an emulator and then deployed to the real thing will know what Jan van de Snepscheut was talking about when he said “In theory, there is no difference between theory and practice. In practice, there is.”

To support you in your WP7 development and help you make the leap from theory to practice, we’re starting our deployment clinics this week! It’s your chance to deploy your app to a real WP7 phone and see how it works. This week’s are being held in:

There are also some events being planned for next week:

(I’m working on Toronto dates for next week…watch this blog!)

We’re working on ways to hold deployment clinics in as many places across Canada, as often as our schedules and pool of phones will allow. For those of you out west, we’re working on getting clinics out your way – watch this space!

Windows Phone Bootcamps

Photo of Windows Phone 7 bootcamp Montreal attendees sitting at a boardroom tableDevTeach’s Windows Phone 7 Bootcamp – a four-city, two-day, hands-on intensive training course taught by Colin Melia – started off quite nicely last week in Montreal (pictured left).

This week, the Bootcamp comes to Vancouver on Monday and Tuesday (August 30 – 31) and Ottawa on Thursday and Friday (September 2 – 3).

Next week, Yours Truly sits in on the Toronto Bootcamp, which happens next Tuesday and Wednesday (September 7 – 8).

Want to sign up for the Bootcamp? Register here, and save $100 when you use the discount code WP7BOOTCAMP.

Windows Phone Training and Deployment Clinics at TechDays

"Microsoft TechDays 2010" logoTechDays, our cross-Canada conference on how to make the most of Microsoft’s tools and technologies, is just over two weeks away, starting with TechDays Vancouver on September 14th and 15th. We’ve got two 65-minute breakout sessions on Windows Phone app development being presented by Windows Phone MVP Mark Arteaga and a half-hour “Turbo Talk” by Windows Phone MVP Anthony Bartolo on distributing your apps through the Marketplace. To find out more about TechDays, visit the TechDays site.

We’ll be running deployment clinics in the TechDays cities when we’re there (those cities, in order: Vancouver, Edmonton, Toronto, Halifax, Ottawa, Montreal, Winnipeg, Calgary), in the TechDays lounge, as well as outside the conference. Watch this blog for details!

Windows Phone Training for Students at Go DevMENTAL

"Go DevMENTAL" logoJust as TechDays is a cross-Canada tour for working developers and IT pros, Go DevMENTAL is a cross-Canada tour for post-secondary students who’d like to learn more about the coolest apps and platforms, get connected with people in the software industry and get help in pursing a career. To find out more about Go DevMENTAL, check out the Go DevMENTAL site.

One of Go DevMENTAL’s tracks is dedicated to creating Windows Phone apps. It’ll have two sessions: one on building Silverlight apps for WP7; the other on building XNA-based games for WP7.

This article also appears in Canadian Developer Connection.