Can Xbox One Be a Trojan Horse to Lure Developers? | Re/code

Can Xbox One Be a Trojan Horse to Lure Developers? | Re/code

Microsoft disclosed Wednesday that it plans to make it possible for developers to write a single program that can work across Windows, Windows Phone and, yes, the Xbox [One].

Dig it.  Can I predict another Microsoft purchase?  They’ll buy Xamarin which makes a great set of tools that integrate with Visual Studio to allow you to truly target one API and make it run on multiple devices.  My only gripe will be if they limit individual functionality on a per-device basis.

Can Xbox One Be a Trojan Horse to Lure Developers? | Re/code.



Effective Java (2nd Ed.)

Effective Java (2nd Ed.)

As a Computer Science student, I think we’re expected to hold a very large library of books.  Some are required textbooks for classes, and others are indispensable bundles of text that we just happen or or passed through the grapevine.  For me, this book is the former.  Effective Java by Joshua Bloch is one of the most indispensable textbooks I’ve ever read on the Java language. (more…)

The Changing Face of Apps

Over the last week I’ve been doing some serious hacking/coding in a variety of languages.  Some of it is necessary for a work project I’m doing, a couple of customized WordPress installs for a company in Seattle that’s required a bit more PHP hacking to get working properly.  Other parts of it are reading books in my (not available) spare time, and still trying to focus on ObjC and CS193P.

I continually amaze myself with the PHP stuff.  I never officially studied the language but I can understand the bulk of it and maybe most important: I can articulate what I need to do in a good Google query.  For me to become really proficient at it I think I’ll need to start using the shell accounts on some of my boxes to make sure this stuff happens the right way.  While flipping through an old C# book at Fry’s a few days ago I stumbled across the realization that I can grok the syntax of just about any modern language!  Most of these languages are all derivatives of C so it’s not a huge surprise, but I could definitely start to implement code that isn’t language specific which is a huge step for me.  Being able to write platform or (lightly) language independent code is what separates a programmer from a Computer Science major I think.  Each language obviously has its own subtleties and nuances and some will always be a mystery to me (like Perl) but I’m feeling more confident in my skills again.

I spent a few hours this weekend futzing around with Canvas, an HTML5 element that allows you to implement drawing and other animation routines in a div in HTML.  My goal was to finally come up with a logo for REV-DEV my other side-biz that definitely needs to start getting a leg off the ground.  Having checked out some cool HTML5 samples I thought this would’ve been easier, but it wasn’t to be.  I found some greatly bouncy balls, starfields, even a text particle generator.  What I was looking for was a text swell/shrink effect similar to what I’d seen in….well, Flash to be honest.  But I’m trying to be proactive and future-proof, and platform independent and all this….and the thing I want is in Flash.

Adobe has seen a bit of the writing on the wall lately, releasing a free preview of Edge ,their Flash exporter to HTML5 app.  It’s not quite available for real-world use yet, but if I could get the download link to complete I’d probably check it out.  I digress, I’m rambling here.

My point about this was that everyone is starting this slow shift to these frameworks and API’s that are smarter, cleaner and more platform agnostic.  Take the Windows8 Metro incarnation– Metro apps will do UI through HTML5 and JavaScript which has included AJAX for a while now.  That’s amazing!  There’s a movement on the iOS side to use the same structure to drive UI and let the native code take care of the back-end tying things together.  I’m not entirely sold on this for iOS5 for reasons I can’t divulge yet….

Finally, this morning Google announced the availability of Dart, a structured web language that provides optional typing and also compiles out to JavaScript.  It’s a language that will work on modern browsers, with the JavaScript intermediary coming out in browsers that won’t support it’s optional MIME type.  It appears to be light, offers easy to read syntax, and is open-source under a BSD license.  It appears to also support a mode for enterprise use that allows the execution of the code in a VM, but I’m kind of lost right now as to usable case for that one.  I’m going to try and get my hands dirty with it a bit today and see what develops…


Calculator (CS193P)

…And per that last post, I finally have the code in the way that I want it.  I think I’ll eventually getting around to showing some screenshots of what’s happening with the memory leak, but I think I’ve gotten everything correct thus far.  I’m uploading the working code as an Xcode 4 project, without any sort of build data with it.  You may need to fire up your copy of Xcode and adjust the build settings to not use iOS 4.3 but provided the API doesn’t change too drastically, you should be good.  Grab that zip file, here.
Also, I’m leaving out the XIB files– I think you can grok your own interface design, no need to steal my binaries.  If you have any questions, I’d be happy to try and help you out but really…it’s all stuff explained in the lecture or in the Assignment 2 request sheet.

What I will do is expose a bit of code here that gave me the most frustration.  It was a class method designed to evaluate an algebraic expression by spawning a working copy of itself to sub the vales of the variables in and return a result.  It was a bit of work to get my head around abstractly, and I think the resulting code is quite efficient and nice (and doesn’t leak!).

+ (double)evaulateExpression:(id)anExpression usingVariableValues:(NSDictionary *)variables
double dubNum=0;
CalculatorBrain *workerBrain = [[CalculatorBrain alloc] init];
for(id item in anExpression)
if ([item isKindOfClass:[NSNumber class]])
NSNumber *workingNum =item;
[workerBrain setOperand:workingNum.doubleValue];
else if ([item isKindOfClass:[NSString class]])
NSString *workingString = item;
if ([workingString hasPrefix:VARIABLE_PREFIX]) {
NSString *subFromDict = [variables objectForKey:workingString];
[workerBrain setOperand:subFromDict.doubleValue];
dubNum = [workerBrain performOperation:item];
[workerBrain release];
return (dubNum);

Anyways, I’m proud enough that I’m heading on to Assignment 3 which implements a Graphing mode. Hopefully I’ll get the instruments post, as well as a bit of a video demonstration of the Calculator in action up here.

Builds are never done…

I finally finished my Stanford CS193P Assignment 2 project, which was to create a working calculator that also implemented an algebraic solver.  I technically “finished” the entire thing and was moving onto the next assignment and packing up the existing bundle to dump up here as example code.
…When I found a bug. Specifically a memory leak that with the help of Instruments I was able to determine was a pretty big freakin deal as I was hemorrhaging resources left and right when I started to call that aforementioned algebraic solver mode.  Grr, not good.  So, I’m going to work it out before I back-commit it and call the second assignment done.  Hopefully I can figure that out today…

Kinnect Hacking: The Future of NUI

Kinnect Hacking: The Future of NUI

Unless you’ve been living under a rock recently you’ll undoubtedly have seen the massive marketing push behind Microsoft’s latest offering, the Kinnect an add-on unit for its Xbox 360 console.  The Kinnect combines (in a very small package) an infrared camera, a VGA camera, a microphone array, and a pan-tilt motor assembly for creating image stabilization. All this to allow your Xbox to respond to gestural input, voice commands, and ushering in the new era of user interfaces: the buzzword NUI or Natural User Interface.

Kinnect Unit

Microsoft's Kinnect head-on

So why don’t I have one? I’m broke for one (ha ha).  But the idea of playing games using this format didn’t appeal to me– I owned a Nintendo Wii for 9 months before pitching it to my sister.  She gets way more use out of it then I ever did, and I’m what you’d call a “hardcore” gamer.  For $150 bones you can add this USB-device to your Xbox and impress your family and friends with its ability to surf your Netflix Watch Instantly queue using just the power of your arm muscles.

In the two weeks since its launch, a bounty was issued for an open-source compatible driver for the Kinnect.  One appeared within days and the explosion of development we’ve seen since then is a bit nuts.  I’m not entirely sure Microsoft cares how many units they sell that are attached to X360’s–I think they’ll continue to sell like hotcakes regardless of where they’re plugged in.  Yesterday I spotted an online guide as an intro to USB hacking using the Kinnect as an example.  It’s by far one of the nerdiest things I’ve seen online lately and it rubs two critical spots for me: teaching the masses, using brand-new shiny hardware for new and different things.

Trolling USB messages for relevant memory addresses...

Trolling USB messages for relevant memory addresses...

Be warned, the guide is not for the faint of heart but it goes into some critical detail for those of you who want to get your hands dirty.

Kinnect represent like all things Microsoft a veiled attempt to push their vision into your life.  15 years ago when Bill Gates was talking about WebTV (shudder) he wanted one in every living room.  While WebTV died, a lot of living rooms contain a gaming console of some type.

Star Trek Holodeck

Star Trek Holodeck

The X360 with Microsoft’s mighty weight behind it is morphing from a game console to a  living room media playback device, and now even more so.  By taking the traditional user interface off of a gamepad and turning it into gesture recognition, Microsoft is showing folks the way forward.  After all, isn’t this just pushing us closer to the Holodeck?

Losing Sight of Goals

It seems over the past week I’ve taken a bit of a back seat on learning C and doing my development exercises.  For a while there I was on a roll– I was reading the books and studying, learning the API’s and other debugging tools.  Most importantly, I was starting to create my own exercises and coming up with solutions.

I received some contact from Seattle U on the status of my application earlier this week.  I figure I should get back to it.  So after taking a week off, I’m trying to get back on track.

For most of my recent learning I’ve leveraged Apress’ really awesome set of C/Obj-C/Cocoa development titles.  The so-called “fruit books”, each title features a different citrus fruit on its cover.  They offer a disounted e-book for each title on a limited time offer.  I don’t need more digital textbooks so I stick with the physical copies.  I highly recommend them for anyone doing Obj-C development on the Mac.  They are very clear, lots of source code (free I might add) and they dovetail very effectively into a cohesive set.

Learn Obj-C on the Mac

Learn C on the Mac

Learn Obj-C on the Mac

Learn Obj-C on the Mac

I should head back to it.  Maybe my next post will involve my bubble sort app that I’m writing.

iPhone OS 4.0

I’m sure you can read up elsewhere on the interwebs about some of the more critical features of the upcoming iPhone OS4 release. What I’d really like to concentrate on is a new clause that I signed yesterday involving development and use of 3rd-party IDE’s or non ObjC languages. The critical portion is reproduced here:

Applications may only use Documented APIs in the manner prescribed by Apple and must not use or call any private APIs. Applications must be originally written in Objective-C, C, C++, or JavaScript as executed by the iPhone OS WebKit engine, and only code written in C, C++, and Objective-C may compile and directly link against the Documented APIs (e.g., Applications that link to Documented APIs through an intermediary translation or compatibility layer or tool are prohibited).

This ends Adobe’s attempt to become a bit more relevant in the web space and I honestly feel a bit sorry for them. Flash has enjoyed being the king of the web for so long they’ve grown a bit complacent. However, if someone tried to convince me 5 years ago that the next battleground would be in the mobile device space and that Apple (ha!) would be on the forefront I would’ve laughed.

So, back to the changes in the dev agreement. My girlfriend’s cousin is currently a Java developer and has been dabbling a bit in iPhone dev, but only through a middle-ware tool called AlcheMo or Flash’s upcoming CS5. This has been his only expsoure to the OS because it would be a challenge for him to learn ObjC this late in the game– in his defense, he didn’t start out as a C programmer so I can understand a bit of his frustration. It isn’t as though he’ll be unable to develop for the iPhone, but he’ll need to do so: a) using a Mac and b) using XCode. As someone who started from the ground up one of these is a bit of a financial investment which is why I started with a Hackintosh.iPhone OS 4 Logo

On the flip side Apple is doing what they’ve always done: encourage shift to their platform. I’m more than happy to develop on a Mac and use one as my primary machine day to day. However the work that I do does occasionally require Windows so I will dual-boot.

iPhone OS4 Outed!

Apple is in the middle of a press event right now detailing some of the major features of the next iPhone OS release, due out in Summer 2010. I’ve read that there will be a Developer Preview released today.

My only problem currently is that I’m still awaiting a MacBook Pro refresh (due in January mind you) that would allow me to migrate to Snow Leopard which is the only thing the current SDK supports (sadly). One of the larger requested features, Multitasking is now available and it looks very sweet. They’ve demonstrated the audio library so Pandora can finally exist in the background as you run other apps, and Skype(!!) maintaining a background status while you’re using the phone for other things.

It’s really exciting but I definitely need some new development hardware if I’m going to take advantage of any of this cool stuff. More later.

Still goin strong…

I can’t seem to do anything with actual intent these past few weeks. I find that learning Objective-C is really hard, but that I start to get the hang of it as long as I’m doing it for long stretches at a time. I’ve told myself today that I’m going to figure out this whole UIView, UIWindow madness out out of the documentation and complete this assignment.

All about the mindset…more later. Hopefully I’ll be able to post this full code block soon.

Mmm.. And Merry Christmas to everyone. Mine went well; how was yours?