Browsed by
Category: Programming

Machine Learning and you

Machine Learning and you

Recently I took the Coursera Machine Learning course from Stanford and got to implement a lot of these kinds of algorithms (HIGHLY recommend the course).  This guy took it a step or two further and added some clever visualizations and additional training tricks.  Very good work – especially considering it was done by a seaming amateur implementer.

It’s fascinating how we can now write small neural nets like this and very quickly train our computers to do work not only as good as us, but in growing numbers of cases, better than the BEST humans in the world could do.  The implications are staggering…and somewhat disconcerting.  What happens when we have enough compute and enough data that our racks of machine learning systems can do all the analysis and optimization of every facet of our society?  What does that leave us to do, and how does our economic system work when many of these thinking jobs go away?

While this has been argued all the way back to the industrial revolution, there is some growing work by more respected people that we are turning a tipping point (http://www.businessinsider.com/technology-is-destroying-jobs-and-it-could-spur-a-global-crisis-2015-6).  Or more interestingly, do we go through another era much like the industrial revolution in which broad swaths of the population become cogs in a bigger machine until we re-adjust.  Much food for thought and social rumination…

Google Code closes down – Taskbar Sound Switcher moves to GitHub

Google Code closes down – Taskbar Sound Switcher moves to GitHub

Well, I didn’t have my project uploaded more than a week and Google send me an email informing me that Google Code hosting is shutting down.  Here’s the email:

Hello,

Earlier today, Google announced we will be turning down Google Code Project Hosting. The service started in 2006 with the goal of providing a scalable and reliable way of hosting open source projects. Since that time, millions of people have contributed to open source projects hosted on the site.

But a lot has changed since 2006. In the past nine years, many other options for hosting open source projects have popped up, along with vibrant communities of developers. It’s time to recognize that Google Code’s mission to provide open source projects a home has been accomplished by others, such as GitHub and Bitbucket.

We will be shutting down Google Code over the coming months. Starting today, the site will no longer accept new projects, but will remain functionally unchanged until August 2015. After that, project data will be read-only. Early next year, the site will shut down, but project data will be available for download in an archive format.

The simplest option would be to use the Google Code Exporter, a new tool that will allow you to export your projects directly to GitHub. Alternatively, we have documentation on how to migrate to other services — GitHub, Bitbucket, and SourceForge — manually.

For more information, please see the Google Open Source blog or contact google-code-shutdown@google.com.

-The Google Code team

 

The good news is that the Google Code Exporter works really well.  The only extra work I needed to do was work up a readme.md file.  A handy tool for doing the markup can be found on http://dillinger.io/ which allows you to write on one side and see the results on the other.

TLDR:
So, if you want taskbar sound switcher – it’s is now hosted on GitHub:


https://github.com/mattfife/taskbar-sound-switcher

 

Quick Audio Taskbar Sound Switcher

Quick Audio Taskbar Sound Switcher

When using my computer I often use my speakers when listening to music, watching movies, or coding something up. As a first-person shooter fan, I usually want to use headphones so I can use the mic to coordinate play with the other live players and not completely bother the rest of the people in the house with gunfire, explosions, and ‘colorful language’.

Switching between audio output devices on Windows systems usually requires no less than:

  1. Right-click on speaker tray icon
  2. Left click on playback devices
  3. Right click on device you want to be the default output device in Sound selector
  4. Left click on ‘Set as Default Device’

Fun! Not. Even worse is that many times I click on the game I want to play only to realize I forgot to switch audio devices.  In many games, alt-tabbing out and switching the default audio device doesn’t actually change the in-game playback device.  You have to exit the game and restart.  Annoying.

What I want is a taskbar icon I can simply double-click to switch between headphones and speakers – or any of my many audio devices really.  So to that end, I wrote up an app that does exactly that.  You simply select which devices you want to toggle between (any number) and double-clicking the tray icon simply toggles you to the very next device.

Or, you can right-click on the icon and select the device directly with a single click.

Give it a try.

Click here to download a copy.

The MSI installer is in the source directory.  Even better is that I’ve put the code up on Google Code and it’s open-source under the BSD license.

Drop a line if you found it handy or have suggestions!

 

 

 

Taking celebrities to lunch

Taking celebrities to lunch

So, you go to the Portland Retro Gaming panel of 80’s Atari programmers. Each one of which made the most popular games of the age, ones you and all your friends played. After the talk, you’re chatting with them and everyone discovers it’s well past lunch. You say, “Hey guys, you wanna go across the street and grab a bite to eat? My treat.”

And that’s how you end up taking all your childhood programming heroes out to lunch.

From L to R:
David Crane – Founder of Activision, Activision’s Pitfall
Tod Frye – Atari’s PacMan, Swordquest series
Rob Zdybel – Star Trek, Star Raiders, Atari Football
Bob Smith – Star Wars, Video Pinball, co-founder of Imagic
Gary Kitchen – Donkey Kong, Keystone Kapers
Mr Kitchen’s son
Me

Installing WordPress using XAMPP

Installing WordPress using XAMPP

When customizing/working on a new WordPress layout – it’s better if you don’t do it on your live blog.  Instead, install XAMPP

http://www.wikihow.com/Install-Wordpress-on-XAMPP

You can then set up the database and install WordPress in the httpdocs/ directory – but that’s not a straightforward/easy process.

Instead of all the extra setup, you can also use Bitnami’s WordPress application that installs WordPress for you and takes care of a lot of the annoying database and other setup bits.  They have versions for Windows, OS X, and Linux to make your life easier.

After setup, instead of the WordPress files being in the normal httpdocs\ directory, Bitnami’s WordPress on top of XAMPP puts the WordPress files in X:\..\XAMPP\apps\wordpress

 

Steam OpenGL tracer/debugger VOGL

Steam OpenGL tracer/debugger VOGL

Steam Developer Days were a little while ago, but As a member of the Intel GPA team, I found their VOGL new tool announcement to be very interesting.  It’s a new graphics debugging/tracing tool – this time from Valve.

Here’s the link to Rich Geldreich’s Blog and gives all the details:
VOGL – OpenGL Tracer/Debugger

You can find the github distribution of the software here:
https://github.com/ValveSoftware/vogl

 

Use Windows Git with proxy server

Use Windows Git with proxy server

Shesh – you’d think they’d have this more easily found on the official GIT website.

  1. Open a bash or cmd GIT shell
  2. git config --global http.proxy http://my.proxy.server:1234

That should do it.

 

Violating your classes Objective-C with method swizzling

Violating your classes Objective-C with method swizzling

Went to a iOS programmers meetup recently here in Portland and they did a talk on the C-runtime.  I missed most of the talk due to other commitments, but the topic of method swizzling came up.

Basically, it allows you to change what class methods are called by a class – at runtime.  In other words, you can start willy-nilly re-pointing your member functions at runtime by:

  1. Create your 2 or more classes as normal (class A, class B)
  2. Create some methods off each class you want to swizzle (A.thisFunc, B.thatFunc)
  3. Swap’em – using the runtime functions:
    1. class_getInstanceMethod()
    2. class_addMethod()
    3. class_replaceMethod()
    4. method_exchangeImplementations()
  4. Profit!

 

While this is obviously very, very dangerous and likely not something you’d do in production, it does create some interesting opportunities for testing and exercising record/replay and persist/restore code.

Either way – interesting write-up.  Perhaps the title of the talk should have been called ‘Stupid Objective-C tricks’. 🙂