For the past few years, I've kept a tradition where I make a blog post around the time of my birthday and I say what my favourite song has been lately. (I think this is the 7th year in a row I've been doing it!)
This year, it's Hiro de la Luna (I confess I don't know what they lyrics mean, but I love listening to the song!)
http://www.youtube.com/watch?v=MpItXkwKrcw
A Computer Scientist's personal research notes Technology, Research, Spirituality
Space and "Home/Earth" feeling
I'm reading Time, Space, and Knowledge by Tarthang Tulku. He takes you through a cool through exercise where you imagine a giant translucent human body. So imagine a 3D wireframe figure where each bone and internal organ is like a glowing thing where you can travel through everything, but still detect the borders of the various bones and internal organs. I imagine the least dense parts as light blue and the outlines as dark blue, but everything is translucent, just more or less so. Got it? Now imagine yourself as a tiny spec and you can travel around the body from inside one bone to inside an organ, to through the skin and so on. Now, Tiny Spec, as you are travelling through this body, why don't you "stop" when you're exactly at the boundary of one of the bones or organs. When you are here, Zam! Now you are simultaneously in ALL of the boundary places at the same time. Like, you are "at" every spot in the body at the same time. How is that for a trans dimensional experience!
So maybe this blog post didn't make any sense, but I thought it was delightful, so there!
So maybe this blog post didn't make any sense, but I thought it was delightful, so there!
Excel - sort by columns and one row divided by another row
Most people probably learn this stuff in primary school, but my school didn't have Excel back then, so I feel entitled to post about Basic Spreadsheet Stuff I learned today. ;)
So here's the first cool thing. Suppose you want to sort your COLUMNS according to the value in one of the rows. For example:
So say I want to re-arrange the columns Red Points, Blue Points etc. so they are a different order, according to the TOTAL row.
In Excel just go Data --> Sort --> Options --> "Sort left to right", then click OK and in the Row column, choose the row number next to the word TOTAL (example: Row 4), then click OK. BOOM! Column sort! Yeah!
Here's another trick. Suppose you want to add another row that's like "Steph Percentage of Total". For example, you want to automatically calculate a row that takes the value of the Steph row and divides it by the value in the Total row, and put the answer in the new row. To do that, just click in a new row (Say it's Row 5), and type =B2/B4. This will put the value of 10/15 or 0.667 into the cell. Now, to repeat this for all the columns, just hover your cursor over the corner of the 0.667 cell until it turns into a black cross, then drag it across all the other cells in the same row. Boom! New calculated row! Yah!
It would be cool if I actually use these tricks again someday!
So here's the first cool thing. Suppose you want to sort your COLUMNS according to the value in one of the rows. For example:
User | Red Points | Blue Points | Yellow Points | White Points |
---|---|---|---|---|
Steph | 10 | 12 | 2 | 27 |
Ban | 5 | 38 | 16 | 8 |
TOTAL | 15 | 50 | 18 | 35 |
So say I want to re-arrange the columns Red Points, Blue Points etc. so they are a different order, according to the TOTAL row.
In Excel just go Data --> Sort --> Options --> "Sort left to right", then click OK and in the Row column, choose the row number next to the word TOTAL (example: Row 4), then click OK. BOOM! Column sort! Yeah!
Here's another trick. Suppose you want to add another row that's like "Steph Percentage of Total". For example, you want to automatically calculate a row that takes the value of the Steph row and divides it by the value in the Total row, and put the answer in the new row. To do that, just click in a new row (Say it's Row 5), and type =B2/B4. This will put the value of 10/15 or 0.667 into the cell. Now, to repeat this for all the columns, just hover your cursor over the corner of the 0.667 cell until it turns into a black cross, then drag it across all the other cells in the same row. Boom! New calculated row! Yah!
It would be cool if I actually use these tricks again someday!
Game Design Fail
On my mobile device, I tapped an offer for a free game called Ultima because it looked right up my alley -- RPG style fantasy. I installed it, and felt excited at the loading screen where it said something like, "Entering the realm of Britannia…". I felt excited to start exploring the world and seeing what I could do.
At the character creation screen, it asked if I wanted to be a Mage or Fighter. I thought, well in World of Warcraft I am already a robed/magic class, so I'd like to try Fighter in this game.
On the next screen, it asked me to customize my character. There were lots of different faces and skin colours to choose from, which was fabulous, but they were all men. I wasn't sure if I was missing something so I Googled to see if it was possible to play a female character.
There it was - in Ultima, the Fighter is a male-only class. I learned that if I had picked Mage, however, there would have been a female option.
I actually laughed out loud. Some game designer somewhere actually decided that women can be Mages but not Fighters? WTF? How old fashioned is this?
Laughing in contempt, I deleted the app. Come on, game industry, get your act together. Quit embarrassing yourselves.
At the character creation screen, it asked if I wanted to be a Mage or Fighter. I thought, well in World of Warcraft I am already a robed/magic class, so I'd like to try Fighter in this game.
On the next screen, it asked me to customize my character. There were lots of different faces and skin colours to choose from, which was fabulous, but they were all men. I wasn't sure if I was missing something so I Googled to see if it was possible to play a female character.
There it was - in Ultima, the Fighter is a male-only class. I learned that if I had picked Mage, however, there would have been a female option.
I actually laughed out loud. Some game designer somewhere actually decided that women can be Mages but not Fighters? WTF? How old fashioned is this?
Laughing in contempt, I deleted the app. Come on, game industry, get your act together. Quit embarrassing yourselves.
New Eclipse Java project using ANT, SVN
I've been a java programmer for 14 years and I still struggle with IDE configuration issues! This morning, I was successful in setting up a new java project and thought I'd record my steps, because inevitably I'll forget what I did.
So, I had a project in SVN that looks kinda like this:
I was having trouble in Eclipse because I kept hitting one of these two situations:
So here's what I did that worked. Or, How to set up a new Eclipse project when an existing codebase and ANT build file exist in subversion already:
As a finishing touch, you'll want to make sure it can still Clean, Dist, Deploy in ANT. So go to Window --> Show View --> Ant, then add build.xml, then double click "clean" and "dist" to make sure it runs OK. Any problems from here are probably in the code files and not in the Eclipse setup.
So, I had a project in SVN that looks kinda like this:
- projectname
- src/
- conf/
- lib/
- logs/
- build.xml
I was having trouble in Eclipse because I kept hitting one of these two situations:
- I'd create a new project from SVN checkout, but my project wasn't a Java Project which means I didn't have things like code completion and build path settings. It was normal NOT to have these things when I was a developer in the early 2000s but these days I am more demanding about my dev basic needs!
- I'd create a new Java Project but this would create clone folders for like "src" and "lib". Then when I did my SVN checkout these would clash and I'd get ugly things happening like trying to edit my build path, but it would deliberately hide my "lib" folder from me, because it thought it was something else. Eww!
So here's what I did that worked. Or, How to set up a new Eclipse project when an existing codebase and ANT build file exist in subversion already:
- Open the SVN Perspective. (Window -> Open Perspective -> Other ... -> SVN Repository Exploring).
- If you don't have this option, you probably don't have Subclipse or something similar set up yet. That's another blog entry!
- Right click on the trunk of the project and choose Checkout, then "Check out as a project configured using the New Project Wizard"
- Choose Java Project and type in your project name (mine is the same as the root bullet point above)
- On the Create Java Project screen, pick "Create separate folders for sources and class files"
- Next it should show you your project name with a "src" folder underneath. Click that "src", then at the bottom there will be a hyperlink (you might have to scroll) that reads "Remove source folder 'src'". Pick that.
- OK Finish and let the SVN checkout do its thing.
- Now, in the Eclipse project tree, right click on "src" (which is currently a naked checkout folder simply called "src") and choose "Use as Source Folder"
- Now right click on "lib" (which is currently a naked checkout folder simply called "lib"), then choose Build Path -> Configure Build Path.
- Now click "Add Jars" and manually add all the jars in your "lib" folder that you have checked out from your svn repo
As a finishing touch, you'll want to make sure it can still Clean, Dist, Deploy in ANT. So go to Window --> Show View --> Ant, then add build.xml, then double click "clean" and "dist" to make sure it runs OK. Any problems from here are probably in the code files and not in the Eclipse setup.
Labels:
ANT,
eclipse,
java,
subclipse,
subversion,
tool configuration
Subscribe to:
Posts (Atom)