Using the toe rather than the ball of the foot when climbing

Disclaimer: I’m still a noob, so take the below with a grain of salt.

In the self-coached climber book, it’s mentioned that “For newer climbers, learning to get onto the big toe is important, as this provides the greatest range of motion.” After thinking about this, this makes total sense. So I drew up a quick diagram of what this means.

20150523_133315

Click for full-size version

As shown here, when you stand on the ball of your foot, the protruding toe and heel limit the foot’s range of rotation. Also, basically the only way to place your foot is with the inside of the foot facing into the wall. However, when standing on the toe, you get an extra +/- ~1 inch of height that you can adjust, and you can rotate your foot a larger amount around the hold.

The cool thing about this technique is that it’s extremely simple to do – just use your toe rather than the ball of your foot when stepping on holds – and it provides obvious, consistent benefits (extra, adjustable height, and a larger ability to rotate). Hopefully this helps someone – I’m off to start trying this out.

Categories: Uncategorized

Possible language feature: View Classes

January 21, 2015 Leave a comment

Note: The below post is something I haven’t really thought about a lot. Needs further development and thought before it could be useful probably.

In relational databases, we often work with views. Simply put, a view is a way of representing data that you’re interested in, without directly showing the data’s underlying structure.

In object-oriented programming languages (my experience is mainly in Visual Basic/C#), I can think of no analogous concept for classes. For example, consider this class:

class Customer
{
    public DateTime DOB;
    public string FirstName;
    public string LastName;
    public string MiddleName;
    public string EmailAddress;
    public string PhoneNumber;
    ...
}

In my application, I will use this class in multiple places. For example, a screen to add Customers would let me create Customers and set all the above fields. Another screen might let me search Customers by name or DOB.

The problem: Everywhere in my application that I deal with Customers, I use the Customer class. However, in most places, I’m only interested in a sub-set of the Customer class (IE: just names and DOB). So areas of my application that don’t care about EmailAddress and PhoneNumber have to retrieve that data from the database, have access to those properties, etc.

A solution: The first solution I could think of would be to make classes that are specific to the problem you’re solving now. For example, if you’re making a Customer searching screen, the model for the screen could be:

class SearchableCustomer
{
    public DateTime DOB;
    public string FirstName;
    public string LastName;
    public string MiddleName;
}

However, this is tedious and messy. For every area of the application, you could need a separate model class, where all of the models actually are parts of the same thing.

A (possibly) better solution: Implement a language feature called view classes. Something like this (the syntax is kind of nasty):

class view SearchableCustomer { Customer.DOB, Customer.FirstName, Customer.LastName, Customer.MiddleName }

The “class” can be created in-line, saving you from having to declare a bunch of classes that are only used in one place. This lets you work with classes in a way that’s specific to your problem, without having to declare and maintain multiple classes. There’s one canonical definition of what a Customer is, and multiple ways of looking at that class.

EDIT: A redditor pointed out that this is a case of the MVP pattern. I wasn’t too familiar with the pattern beforehand, but it seems to work for this. Customer is the model. The presenter converts customer into objects that are useful for particular views. I’m still wondering if this could be done on a language level, rather than in code, though.

Fixing ContentLoadExceptions in MonoGame with the new content pipeline.

December 28, 2014 Leave a comment

Just a quick note for future reference/anyone having this problem: If you’re using MonoGame’s new content pipeline tool, and you’re getting a ContentLoadException when attempting to load content generated from the pipeline tool into your game, try the following:

1) In explorer, navigate to the startup project of your solution.
2) Go into the bin/Windows/Debug/Content/ folder (or whichever folder corresponds to your Content directory).
3) Verify that the folder/file structure in this directory matches the structure of your files/folders in your MonoGame content project. If it doesn’t, there’s a good chance that the content files aren’t getting copied to the output directory when the solution is built.

If this problem happens, I’ve usually been able to fix it by adding files to my solution, and/or changing the “Build Action” of those files in Visual Studio to Copy if newer or Copy always.

Categories: computers, gamedev Tags:

MonoGame – importing FBX files from Blender

December 9, 2014 Leave a comment

I’ve been working on a game in MonoGame recently, and had some issues getting FBX files exported from Blender to display correctly in my game. MonoGame would load the Models without throwing any exceptions, but nothing would appear on-screen when the Model was drawn. The below steps are how I fixed this problem:

1) Exporting the model.

In Blender, when you export the model, make sure to do this: File->Export->FBX. Under the “Export FBX” pane, make sure to select “FBX 6.1 ASCII”. Then export the file as usual.

2) Adding the model to your project.

In Visual Studio, go to your MonoGame Content project and Add->Existing Item the FBX file that was just exported.

After doing the above steps, Models should now be viewable in MonoGame.

Categories: Uncategorized Tags: , ,

A couple useful emacs lisp functions

September 16, 2014 Leave a comment

Here are a couple functions I recently added to my .emacs file that I figured I’d share in case they’re useful to someone.

new-scratch-buffer: Creates a brand new scratch buffer, without you giving it a name.

A lot of times I will want to quickly take notes on something. Thinking of a file name and creating a file is cumbersome. Switching to a buffer named *scratch22*, for example, is cumbersome as well. Thus, I wanted a single command to create a new buffer with an automatically-picked name, that I can type into. new-scratch-buffer is working well for this, so far.

Here’s the code:

(defun new-scratch-buffer ()
  "Creates and switches to a new scratch buffer"
  (interactive)
  (switch-to-buffer (concat "*scratch " (current-time-string) "*")))

avg: Gets a rough average of a list of numbers

This one’s probably about as basic as it gets, but I found it useful when processing a bit of data.

It’s used like this:

(avg 0 5 10 15 20 25)    ... should return 12 (it should ignore remainders)
(defun avg (&rest number-list)
  "Averages a list of numbers"
  (setq sum (apply '+ number-list))
  (/ sum (length number-list)))
Categories: Uncategorized Tags: , ,

A reason to have “faith in humanity”

August 21, 2014 Leave a comment

A lot of people say they’ve “lost their faith in humanity” when another person/group does something particularly unagreeable. Here’s a thought to counteract the notion that humans are beyond the point of hope as a species, or that the species is doomed to harm the world/themselves for eternity.

When humans first evolved from other organisms (over a long period of time, yes), there was no civlization. No towns, no roads, no electricity, no mathematicians, no artists, etc, etc. Over time, these things developed and are now commonplace. Each of these professions/advances make the world better for humans to live in.

If there was something fundamentally wrong with humans (read: humans really only end up destroying the world/each other), one would think the world would look a lot different. Instead of a gigantic civilization with a majority people working to better themselves and the world, everyone would be robbing every other person/making the world worse. This does not seem to be the case.

My argument boils down to: If humans are fundamentally “bad”, why does the vast majority of humanity spend the vast majority of their time doing things that are “good”? Learning, entertaining themselves, socializing, improving in a discipline, etc. If humans were fundamentally “bad”, you would expect to see the majority of people stealing from other people, damaging the infrastructure set up by others, and making the world a less friendly place for humans to live in.

The reason to have faith in humanity then, is that if humans overall try to make the world a better place more often than not, over time the world should become a better place to live in for humans.

Categories: Uncategorized

Thought Technique – Place yourself in the mind of a Medieval peasant

August 20, 2014 Leave a comment

One technique I’ve used quite a bit for determining if a proposition is absurd or not is to place myself in the mindset of a peasant living in the Middle Ages. I do not claim this is a new technique, but it seems like a technique that’s useful for analyzing claims.

For example, I was recently reading a few peoples’ takes on the recommendation that people follow their dreams. The question is whether or not the recommendation for people to follow their dreams at all costs is good advice or not. How would a Medieval peasant respond to you if you asked them to follow their dream of becoming the most famous bard in their country (yes, I’m relying on tropes big-time)?

If the proposition sounds absurd when proposed to a hypothetical peasant, that might indicate that the proposition is faulty.

Categories: Uncategorized
Follow

Get every new post delivered to your Inbox.