http://stevemoser.org

July 15, 2012

http://stevemoser.org

I won’t be updating this blog anymore but you can find about more about me through these links.

 

Find me at stevemoser.org
Follow me on twitter.com/stevemoser
Fork me on github.com/stevemoser

Advertisements

Why I decided to switch from EE to CS

January 21, 2009

This is the essay I wrote to the Dean of Engineering on why I want to switch from EE to CS.

I am requesting a transfer from Electrical Engineering to Computer Science. I have come to this decision based on my increased desire to become a software engineer. Even though I have always had an interest in electronics I discovered that I enjoy it more as hobby than as a career. My interest in programming began after I started to tinker with Lego Mindstorms in 6th grade. I wanted to extend the capabilities of the kit so I looked into NQC (Not quite C) which is a C based programming language for the kit. From there a took a C++ class in high school and recently did quite a bit of scripting work for Caterpillar this summer in what was supposed to be an electrical engineering internship. I enjoyed it so I decided to switch to computer science. I succeeded more in the CS courses I took this fall than my previous EE courses. I have planned the rest of my course work for CS and I believe I can graduate in 3 to 4 semesters since much of my EE coursework transfers. Steve Herzog advised me on the decision and believes that I have demonstrated the ability to succeed as a CS student. Both departments are very prestigious thus making this a very hard decision but I believe this is the best decision for me in the long run. I feel that CS requires more creativity and interest in discrete mathematics than EE and EE requires more of an interest in continuous mathematics and physics. I wish I had known that difference back when I made the decision on which major to study.

Please leave comments if you had to make a similar decision. Thanks

Gmail’s Quick Links rounds up your Bacn

January 17, 2009

I posted before about how to filter your Bacn email by label but I found out that you can’t make a label containing other labels. Gmails Quick Links is the solution. Quick Links provides a ‘quick link’ to saved email searches. By default if you search ‘label:Amazon label:iTunes’ you will get messages that contain both labels(Boolean ‘AND’). We want to get messages that contain either label. Thus enter:

‘label:paypal OR label:iTunes OR label:twitter OR label:Amazon OR label:Facebook’

Now you have all your Bacn in one place.

Clean Outlook contacts AppleScript

January 11, 2009

Apple’s Address Book is a great contact manager that comes with every Mac. So when I made the ‘switch’ I easily imported my Outlook contacts using the vCard format. However the ‘notes’ section of all my contacts looked like this:

address-book

So I wrote one of the simplest Address Book AppleScripts ever. Check it out:


tell application "Address Book"

set peopleCount to (count every person)

repeat with i from 1 to peopleCount

set note of person i to ""

end repeat

end tell

This site got me started on the script:

http://paulschreiber.com/blog/2007/02/13/address-book-applescript-example/

Save your Bacn: From your Inbox

December 31, 2008

I decided what better way to get ready for the New Year than to setup a few gmail filters for Bacn. Bacn is mail you want, but not right now. GlitchNYC gives a good outline on how and why you would want to do this. I thought I would compile a list of bacn that gets a label and skips my inbox for you to get you started or spark some ideas.

Facebook: Any message from Facebook
Twitter: Any message from twitter-follow-EMAIL@postmaster.twitter.com
I don’t want all messages from twitter to skip my inbox, just the follows, because I want to see my DM’s NOW.
iTunes: Any message from Apple AND subject contains receipt
Paypal: Any message from Paypal AND subject contains receipt
Amazon: Any message from Amazon AND subject contains order

That’s about 90% of my bacn. I wish gmail could automatically recognize these like it does spam. I made tried to create a master bacn filter to check these all at once however gmail does not let you filter labels. Let me know if you have any suggestions.

Last.fm Folksonomy iTunes Applescript

December 26, 2008

*Updated, sorry I used ‘code’ tags instead of
‘pre’ when I posted the code. Try it out now*
I’ll post more details later but I just wanted to get this off before I leave to see my family for the Holidays. This is an applescript for iTunes that I modified. The orginial grabbed the top tag for an artist from Last.fm and wrote it to the genre field of the ID3 tag of a selection of mp3’s. I modified it to grab the tags for each individial track and write them to the groupings field. This allows you to make smart playlists of your music based on the Last.fm tags. So in the end your music will be organized in a Folksonomy fashion. Here is the code, think of it as a belated Christmas gift or celebration of the Fevistal of Stephen :)

(*
--orginial script authored by Last.fm user T-spoon
--modified by Stephen Moser
contact@stevemoser.org

v1.0 Dec 26 '08
-- initial release

http://www.stevemoser.wordpress.com

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for more details.

Get a copy of the GNU General Public License by writing to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.

or visit http://www.gnu.org/copyleft/gpl.html
*)
tell application "iTunes"
	if selection = {} then
		display dialog "You must select one or more tracks first." buttons {"Cancel"} default button 1 with icon 1
	end if
	set trackList to selection
	set lastartist to ""
	set lastgenre to ""
	set lastcomment to ""
	repeat with i from 1 to count of trackList

		set thisTrack to item i of trackList
		set theartist to artist of thisTrack
		set thename to name of thisTrack
		set thegroup to grouping of thisTrack

		--set genre of thisTrack to ""
		--set comment of thisTrack to ""
		set thiscomment to ""

		set theurl to "-d api_key=f10c1bc4b66d5a4b6ca86440d95a32e8 -d method=track.gettoptags -d artist=" & my encode_text(theartist) & " -d track=" & my encode_text(thename) & " http://ws.audioscrobbler.com/2.0/"

		set tags to {}

		set thexml to do shell script "curl " & theurl
		if thexml does not start with "failed" then

			tell application "System Events"
				delete every XML data

				set this_data to make new XML data with properties {name:"lfm", text:thexml}
				--tell thexml to set level_1 to XML element 1
				--tell thexml to set level_2 to XML element 1 of level_1
				tell XML element of this_data
					every XML element of XML element 1

					repeat with x in every XML element of XML element 1
						set thetag to value of XML element "name" of x
						set thestrength to value of XML element "count" of x
						--change strength to your taste
						if thestrength as integer ≥ 1800 then

							set the end of tags to thetag
						end if
					end repeat
				end tell
				delete every XML data
			end tell
			if tags ≠ {} then
				--set genre of thisTrack to item 1 of tags
				repeat with i from 1 to count of tags
					set thiscomment to thiscomment & "‹" & item i of tags & "›"
				end repeat
				set grouping of thisTrack to ((get thisTrack's grouping) & thiscomment)
				--appends tags to grouping, can change this to comments
			end if
			delay 2
		end if
		--set lastartist to theartist
		--set lastgenre to genre of thisTrack
		--set lastcomment to thiscomment

	end repeat

end tell

-- this sub-routine is used to encode text
on encode_text(this_text)
	set the unacceptable_characters to " &+%'/\"\\()"
	set the encoded_text to ""
	set the character_list to {}
	repeat with this_char in this_text
		set this_char to the contents of this_char
		if this_char is not in the unacceptable_characters then
			set the end of the character_list to this_char
		else
			set the end of the character_list to encode_char(this_char)
		end if
	end repeat
	return (the character_list) as string
end encode_text

-- this sub-routine is used to encode a character
on encode_char(this_char)
	set the ASCII_num to (the ASCII number this_char)
	set the hex_list to {"0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "A", "B", "C", "D", "E", "F"}
	set x to item ((ASCII_num div 16) + 1) of the hex_list
	set y to item ((ASCII_num mod 16) + 1) of the hex_list
	return ("%" & x & y) as string
end encode_char

You can change the field it writes to to the comments field instead of groupings. Also you can change the strength of the tags it looks for. This script might have problems if your artist name or track name has special characters. I will post updates in the future. Let me know if you have any problems.

This is the original post on Last.fm that started the project:
http://www.last.fm/group/Last.fm+Web+Services/forum/21604/_/285676/1#f8093324

Thank you Doug from DougScripts, t-spoon, and nautisch for your help.

I also referenced these sites for the idea.

http://www.svankruistum.com/itunes-tagger-now-with-lastfm-tags/
http://lifehacker.com/software/itunes/tag-your-songs-in-itunes-153970.php

Underage Hand Art – New art genre?

November 13, 2008

Is it a boxing unibrow sailor? Or a poor sap who cut himself shaving?

bar hand art

bar hand art

Went to different bars. First door guy gave me a unhappy face for just being underage. Second guy made it bloody. :(

Just Jump In

November 11, 2008

So I haven’t posted to my blog lately. I guess I feel like I don’t have time to post or to make a very good post. I read other rss feeds with awesome graphics and feel like a post with just text is worthless. I guess I need to just jump in and start blogging.  I kind of did that with my ‘Just swag it’ blog that I am shutting down. It was a good test run. You can’t getter better without practice. Oh and not to just make this a worthless post I have an iPhone app pick. Its Ocarina, which can be found here.  It is definetly worth a buck. Everytime I play it for someone they are amazed and instantly want to try it. It is the original apps that get attention these days.

ilrn.com calles Chuck Norris a Woman

November 6, 2008

Chuck Norris

I found this while doing my online Logic Philosophy homework. Actually it claims that Chuck Norris is a woman is an invalid argument. I was still pleasantly surprised when I found Chuck Norris in my homework.  Time for a few Chuck Norris jokes.

Chuck Norris can make a valid arguement with a true premise and a false conclusion.

Define Vacuous Truth: The displacement of matter behind Chuck Norris’ roundhouse kick.

-Steve Moser

In Respone to Rands’ Talk

October 4, 2008

This is an excerpt from an extra credit assignment I did for CS210, a course in computer ethics. We had to evaluate a speaker from the ACM UIUC Reflections Projections conference. I attended Rands’ talk about nerds.

    “Rands is a very charismatic speaker, to nerds that is.  Rands is his online alias, his real name is Michael Lopp. The engineering management evangelist is most prominently know for his book Managing Humans and his blog RandsInResponse.  Both of which are about how engineers can be better managers.  One of his more famous articles “The Nerd Handbook” <http://www.randsinrepose.com/archives/2007/11/11/the_nerd_handbook.html> is a guide to show significant others of nerds how nerds ‘work’.  I actually read the article when it was published around a year ago so I was excited about attending the talk.

    The first thing I noticed about Rands’ talk was his slides. They were usually a combination of black, white, and gray with beautiful typography, which is understandable because he is a self proclaimed typography nerd. The first part of his talk was about different types of nerds and geeks. Rands then parsed important nerd needs like the ‘cave’, quoting some of his ideas from “The Nerd Handbook” article. He definitely knew his audience because many of the attendees were laughing and clapping. To finish up his talk, Rands made a ‘context switch’ from nerd cliches to how to start a career, not getting a job.  He offered insightful advice on how to improve one’s resume and left with an offer to provide “30 seconds” of personal resume advise to anyone who sends him their resume.”