If you happen to be having issues with Mapstraction’s resizeTo() method, remember this: the arguments that it takes in must have a ‘px’ after them. For example
map.resizeTo(’100px’, ’100px’);
I had forgotten to add the ‘px’ after the number, and it didn’t work. As a result, I spent more of my afternoon than I would have liked trying to figure out why my map wouldn’t resize properly…
In Exercise 1, when creating your first Read-Only Web API, there’s something that isn’t mentioned and it should be. When creating the ContactController class, it isn’t specified, but it needs to inherit from ApiController, not just Controller. This also means that you will need to add “using System.Web.http” to the using statements. Basically, it should look like this:
Without those two lines, you won’t get a response (instead you’ll get a 404, and you won’t be able to see the details of the response). Unfortunately there’s no comments allowed on the article, as this could be a ‘gotcha’ to other people trying to work through it. The downloadable samples that they provide do work, but it’s nice to know what is causing the problem, rather than having to download and start working with someone else’s code.
I had no idea that I’ve had a WordPress blog for six years. I suppose time flies when you are having fun!
Recently I’ve come across two amazing things:
1. This: http://bookofhook.blogspot.ca/2013/03/smart-guy-productivity-pitfalls.html Seriously – read it if you haven’t. It’s a blog post by Brian Hook – an Id employee who worked next to John Carmack. It totally rang true as I was reading it – how many times I’ve thought something like ‘Oh, I can do that in two hours’, only to not have it done two days later. This past week I really tried to work a lot harder, and I think it showed. I was able to get a lot more coding done than what I had previous coding sessions. I tried following the advice of listening to some nice, ambient music while coding – nothing too distracting. If I wasn’t busy coding/thinking about what I was working on (for example, checking Twitter), I’d pause the music. I started to notice an interesting connection: I enjoyed listening to the music (even if it was quite/ambient stuff), so I’d naturally gravitate to going back to work so I could start listening again. I don’t know if that was really intentional or not, but it was an interesting side-effect of things.
2. I’ve rediscovered the BEPUphysics library: http://bepuphysics.codeplex.com/ . It’s seriously 10 times more awesome than what I remember. I was looking through the demos included in it, and a colleague of mine said “There’s got to be a game in here somewhere!”, indicating that even just taking one of the demos and turning into a game could be awesome. That got me thinking: how long would it take, if a person was using BEPUphysics, XNA, and Lidgren, to hack out a rough Quake 3 clone? Could it be done in a single weekend? I’m guessing it could. It’s pretty amazing to think that that sort of thing is now possible when ten years ago it wasn’t (at least not to the same level as it is now – unless you happen to be John Carmack, or John Carmackian in nature).
Screenshot of BEPU in action. Seriously, it’s almost a game already!
Joel
5:35 PM on February 26, 2013 Permalink
| Reply Tags: Gmail, Hotmail, Inbox, Size
This is for anyone still running the older Windows Live interface for Hotmail.
The other day I was wanting to figure out how much space my Hotmail account was using. Unlike GMail, this is something that Microsoft doesn’t obviously state, and they don’t ever seem to explicitly state that you only have so much room. That being said, I did just stumble across how to see the size of all your emails.
First, bring your mouse over the “Folders” label on the left hand side. You should see a small gear icon, like this: Click on it.
Now you should be taken to a page showing all your folders and how many messages are in each one, as well as the size of each one. Conveniently at the bottom is a total. Mine looks like this:
And there you have it – you now know the size of all your emails!
Unfortunately Microsoft will be forcing everyone over to the new Outlook style inbox, which I personally dislike, so this will only work up until then.
The first semester of my Master’s began with a lot of signature finding, running up and down the hill (upon which the campus is built), and trying to figure out who needed which piece of paper, and what signature had to be where. For some reason the phrase “Hunt the Wumpus” came to mind. It’s as if I was trying to find some mythical beast, hidden somewhere on campus. Each place I would go to would have a clue as to what might be coming up next.
This semester hasn’t been any different. It went something like this:
Look for a piece of paper (at home) from last semester, which seems to have disappeared. Don’t find it. Look at school in the lab (at the bottom of the hill). Don’t find it there either.
Ask the folks at the Dean’s Office (at the bottom of the hill) if they know where I can find a copy of the paper I need. They say it’s at the School of Graduate Studies office, at the top of the hill.
Go to the School of Graduate Studies office at the top of the hill. Get a copy of the paper from last semester.
Get the signature from one of my supervisors (at the bottom of the hill).
Take the paper back to the School of Graduate Studies (at the top of the hill). They say it has to go to the Registrar’s Office (part way down the hill).
Take signed paper to the top of the hill to the Registrar’s Office (part way down the hill).
Wait for registration to go through.
Eventually go to the cash office and pay my tuition (further up the hill).
Also, somewhere in there, there was another piece of paper that needed two signatures, but at least they were in the same building and even on the same floor! It’s no wonder folks around here generally look quite fit, with all that running up and down the hill that has to be done…
Joel
11:06 AM on January 18, 2013 Permalink
| Reply Tags: Emergent Gameplay, Skyrim
I recently came across this hilarious series of entries at PC Gamer, describing how someone was going to play through Skyrim using nothing but illusion magic (meaning that the player could not directly cause damage to anyone in the game – including punching people). I’ve heard of similar things happening – like the guy that played through all of Deus Ex without killing anyone. Somehow, I get the feeling that the designers of these games had no idea that people would try such things.
I really do think that unintended or unexpected gameplay is the sign of the signs of a great game. There’s something to be said about it, when the players have fun with it. Isn’t that the goal of a game – to have fun?
I really haven’t done much of my own game development, but I image the process goes something like this:
Create a set of objects (including the game world and the player)
Set up rules that determine the behavior of each object.
Set up rules that define interactions between objects.
Set up any other explicit rules for how particular interactions should occur.
Establish gameplay by putting some sort of limit or goal when particular things happen.
Things get interesting when the interactions between objects are defined. The more general the behavior and interactions, the more interesting things can become. That’s where emergent gameplay seems to come from – unexpected interactions that weren’t explicitly defined by the game designers. It just tickles me pink when I hear of stories like the one from PC Gamer when things like that happen. It shows that even designers can’t plan for everything.
Over the holidays I had a chance to go see the Hobbit in High Frame Rate 3D (HFR 3D). Rather than being shot at the traditional 24 frames per second, it was shot at 48, but was only shown at 48 in a few select theatres (in my case, the nearest being 300 km away). Rather than try to explain more to you about it, just watch this instead:
Prior to watching it, I had heard a great number of complaints/mixed reception about the HFR 3D. I can honestly say the following:
The high frame rate 3D was fine. There was nothing wrong with it, and it worked very well for the action scenes. Peter Jackson (and other directors), if you are listening, please continue to release action films using HFR 3D!
I really don’t get what all the complains were about. Yes, it looks different, but it definitely gives the film a much smoother feel. I also didn’t notice any strobing or flickering in any of the shots, unlike other 3D films I’ve seen. (Hugo comes to mind immediately – in the opening shot I noticed considerable strobing as the camera zooms in between two parked trains). I think it works great for the action scenes, as everything was nice and smooth.
I’ve also heard some opinions from people who didn’t like the film for various reasons. I think they fall into one of the following categories:
People who haven’t read the book recently.
People who last remember the end of the Return of the King, and forgot everything that had to happen to get to that point.
People who are expecting another Lord of the Rings. It’s a different story set in the same universe.
If you fall into either of those two categories, go read the book! The movie really was quite close to the book (even some of the dialog was almost spot on!). Sure, there were a few creative angles taken on things, but I can agree that the changes do make the story flow a bit better and give a more definite enemy, which again, helps the story.
In short: don’t be afraid to watch the Hobbit in HFR 3D!
I figured I’d better get with the times and actually try out Windows 8. Luckily, I’ve got a netbook that hasn’t been doing too much lately, so I threw in an Intel 60 GB SSD into it, and put Windows 8 on it. While there are some improvements to it over Windows 7, there’s a few things that I definitely don’t like about it. The biggest of these is probably how buried the power button/sleep button is. Let’s compare Windows 7 and 8 in this regard, how how many clicks it takes to put a PC to sleep:
Windows 7
Click the start button
Click the over arrow (or wait for the menu to appear)
Click Sleep
Windows 8
Move mouse to the upper or lower right corner
Move down to the Settings button and click it
Click the Power button
Click Sleep
Now if Microsoft had been paying attention, they’d notice that there’s an extra step in there – and if they’d have taken a lesson from Google on saving button clicks, they would have made it way less buried. Seriously. I think I had to Google how to put my own PC to sleep. This might work fine for low power touch devices where you can just hit a button to put the machine to sleep, but for something a bit bigger like a PC, it makes no sense. This annoyed me enough that I wanted to write a sleep button app that was more accessible. I wanted to write this as an app-formerly-known-as-Metro-style-app, but I couldn’t. Because of the sandboxed nature of Windows-8-style-formerly-known-as-Metro-apps, it’s completely impossible. The best I could do is write a WPF app that looks sort of like a metro-style app.
Anyway, since my hopes and dreams of making a power button app on the Windows App Store were dashed, I figured the best I could do is give away the app for free so that others don’t have to suffer. So without further ado, you can download the app here:
Download it, unzip it, and put it some place where you won’t delete it. Want to shut down/restart/sleep your machine without having to go through 30 levels of menus?
Press the Windows key
Start typing “PowerButton”
Hit enter.
Make your selection.
Not so bad, now is it?
Joel
11:41 PM on December 10, 2012 Permalink
| Reply Tags: Croutons, Food, Homemade
I’m a big fan of turning something that is a potential waste product into something useful. For example, recently one of my roommates had a loaf of bread that was getting quite dry and had been sitting on the counter for some time. There’s no point in throwing out a mostly perfectly good loaf of bread…
Joel’s Homemade Croutons
(Please, excuse the cruddy cell phone pic. It’s what I had available to me at the moment.)
Ingredients
Old, dry, bread (old French bread works great)
1/2 cup olive (or canola) oil
Onion powder
Garlic powder
Seasoning salt
Dried Oregano
Optional: Fish sauce
Steps
In a bowl, combine the oil and spices. Mix well.
Cut the bread up into small cubes.
Quickly toss the bread in the bowl with the oil and spices. (The longer you let the bread sit in the oil mixture, the heavier/more oily it gets. The best way I’ve found to toss it is to use your hands. Sure, they get all oily, but what’s a good kitchen adventure without a bit of something on your hands?)
Lay the freshly tossed bread cubes onto a cookie sheet one layer thick. Place in an oven at 400 degrees F. Every few minutes pull them out, and give them a stirring/flipping so that all the sides get crispy. They are completely done when the bread is nice and crunchy.
Eat them! Since the croutons are already pretty much dried out bread, leaving them on the counter won’t hurt them. I’ll usually toss them on some spring greens with a bit of salad dressing.
I’ve recently been doing some playing around with a Makerbot Replicator 2, which has been pretty nifty. Before I got my hands on the 3D printer, though, I wanted to learn more about the STL file format that seems to be used by all of them. I did some reading, and figured out that there are basically two styles of STL file – binary and text. I wrote an STL file loader in XNA, just to see how difficult it was to parse the files. (It’s been a while since I have done something like that, and was itching to do it). You can read about the STL file format here. I’ve hacked together a small STL file loader in XNA, which you can find here. The included STL files came from Thingiverse. The included code should be reasonably straightforward. The only tricky bit was getting XNA to render inside a Winforms app. (Digging through the XNA examples, I hacked apart the one windows form example and got it working). That, and the camera code is pretty screwed up, so feel free to ignore/replace it. (I was experimenting with some 3D camera movement at the same time). Also, the various triangles are randomly colored, just to make it easy to see everything that is being loaded.