Registered for the draft

4 #

Since I am 18 now, according to the law, I must register for the draft within 30 days. Therefore, I registered today online. I must say however, registering was definitely not a fun feeling. Especially since the government has plans to reinstate the draft. ..

You can stlil raed seabrmlcd wdors…kindof

6 #

Most of you have heard of this effect from an email that went around beginning with: Aoccdrnig to a rscheearch at Cmabrigde Uinervtisy…. If you didn’t, go read it now!

So being bored one day (even though I still had piles of homework to get done), I decided to write a python program to scramble my own words and sentences! Grab the file here: WordRearranger.py. I’ll post what I have right now (to fill up some space. Otherwise, this post doesn’t seem all that important!):

"""
Word Rearranger by Michael Huynh

Rearranges the letters inside words for the idea that wrods can siltl
be rbedalae if the fonrt and lsat lteters are kpet cnotsnat.

Version 1 (09/28/04)
Version 2 (09/29/04) - Fixed bug when punctuation counted as part of a word.
  For instance: [However,] would be arranged with the H and the , in fixed
  positions rather than the H, r, and , in fixed positions. Added a recursive
  solution. Thanks to Penguin for pointing out this bug!

Future considerations: Want to modify this program? How about adding a
degree of obfuscation to the program? This value can be adjusted to change
the *extent* to which letters can be moved around. For instance, the word:
[composition] can be extremely jumbled like: [cotiioosmpn], or it can be
mildly jumbled like: [copmsotioin]. This would be an interesting study to
determine the degree of word jumbling that can occur but still retain elements
of recognition.
“”"

import random
import re, string

“————————————–”
“Definitions: ”

#Function to rearrange letters in a word
def shuffleWord(inWord):

    #Filter for 1, 2, or 3 characters
    if (len(inWord)<4):
        return inWord

    charList = list(inWord)

    #place list into new sequence
    firstChar = charList[0:1]
    lastChar = charList[len(charList)-1:]
    midCharList = charList[1:len(charList)-1]

    #-----------------------------
    #If first and last characters aren't letters or numbers, then
    #scramble where the letters start
    if(re.match('W', lastChar[0])): #If the last character is not a word
        #send first+mid Chars into this function again for processing
        firstAndMiddleChars = midCharList
        firstAndMiddleChars.insert(0, firstChar[0])
        return (shuffleWord(firstAndMiddleChars)+lastChar[0]) # + means concat
    if(re.match('W', firstChar[0])):
        midAndLastChars = midCharList
        midCharList.append(lastChar[0])
        return (firstChar[0]+shuffleWord(midAndLastChars))
    #-----------------------------

    random.shuffle(midCharList) #randomizes the middle characters
    #print firstChar, midCharList, lastChar

    #join together in one list
    wholeShuffledWord = midCharList
    wholeShuffledWord.insert(0, firstChar[0])
    wholeShuffledWord.append(lastChar[0])
    #print wholeShuffledWord

    #convert list into string and return
    shuffledWord = ''.join(wholeShuffledWord)
    #print shuffledWord
    return shuffledWord

"--------------------------------------"
"Main program: "

"!!!! For reading from a file !!!!"
"""
# Open a file, read the text
inputFileHandler = open('sometext.txt', 'r')

#Read into string
inputFile = inputFileHandler.read()
"""
"!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!"

"!!!! For manual input !!!!!"
inputFile = "Python is an easy to learn, powerful programming language. It has
efficient high-level data ,structures and a simple but effective approach to
object-oriented programming. Python's elegant syntax and dynamic typing,
together with its interpreted nature, make it an ideal language for scripting
and rapid application development in many areas on most platforms."
"!!!!!!!!!!!!!!!!!!!!!!!!!!!"

#Split string into and word list
listWords = inputFile.split()

#Scramble word
for eachWord in listWords:
    #Split word by characters
    print shuffleWord(eachWord), #comma supresses newline

""" Sample output:
Photyn is an esay to learn, puoerfwl pnmigrramog luganage. It has eiefifnct
hilgheve-l data ,sctuuetrrs and a spmile but efeivftce apoprcah to
ooerjtenb-eitcd pmoaingrrmg. Ph'tyons elgnaet synatx and damniyc tnyipg,
ttehoger wtih its ietnretrped nraute, make it an iaedl lggnuaae for sncirtpig
and riapd appioitclan dvlepnmeeot in many areas on msot plmtorafs.
"""

My conclusions about this letter scrambling idea were very similar to the ones I found on a Cambridge University’s site explaining why this works. I also found a paper that related somewhat to this idea: Reading quickly in the periphery — the roles of lettersand sentences.

Now back to work for me!

A question of sanity

0 #

Penguin: I’m so busy, I work and go to school and work and do homework and go to school and work and, every once in a while, sleep…
Mike: That’s not very good for your sanity.
Penguin: Oh, don’t worry about that, I have plenty of……
Mike: Ah, ha, ha, haha, hahahaahaha.
Penguin: Hahahahahahaha….nevermind.

Tags:

Nuclear Test in North Korea?

1 #

Just new on Kuro5hin: On September 11, the South Korean news agency Yonhap reported a huge blast and a 2.5 mile diameter mushroom cloud in North Korea 6 miles southwest of Yongjori Missile Base…on Thursday. Was it really a nuclear weapon? Or was it something else?

Pie are squared

2 #

On Tenchi in Tokyo forums, there was a thread where members randomly threw out laws. I added mine:

Math Bakery rule #3.14:

Pie are squared.

Tags:

Science Club Proposal

19 #

This is a stub until I can get my [CENSORED] off of this seat and write more :):

Read the latest Upper Darby High School Science Club Proposal Here (Version 1.2)

Older Version 1 Proposal

(Written in LaTeX and generated with pdflatex, you might see very pixelated fonts while viewing the pdf. I apologize for now and I will post another version later.)

Republican government manipulation

1 #

Another example of Republican government manipulation for self-interests.

Philadelphia to have Wi-Fi!

11 #

Philadelphia Plan Would Give WiFi Access to the Whole City. This is super-awesome!

Humor Me: Dumb News Headline

1 #

I was on Yahoo today and saw this headline:
Clinton a little scared of bypass surgery

and I thought: “Gee, what kind of headline is that? Who wouldn’t be “a little scared” of bypass surgery?”

Next, we’ll be having headlines like: “Clinton confesses that he hasn’t taken a crap in 2 and a half days.”

What absurdity!

EDIT: Ha! It looks like the news editors at Yahoo finally woke up or something. The headline now reads: “Clinton in Good Spirits Before Surgery”

Mr. Connelly quotes

8 #

Mr. Connelly is my super-awesome AP English teacher. Since his class plays out like an anime/manga, I decided to put up some funny quotes/events here. If I have missed any, please add it in the comments! Thanks!

9/1/04:

  • “blah..blah…Pride and Prejudice by Jane Austen. You might say: “Ugh, that’s a chic book!” but it really isn’t!”
  • Mr. Connelly: “What’s the only one thing you can live off of for the rest of your life?”
    Quayle: “Ham.”
    Mr. Connelly: “No! Hamlet! It has all the things you need like ____(forgot what he said).”
  • Mr. Connelly: “If you ever degrade another student in my class then….ha, haha, hahahaha..” *starts laughing manically*
    Rest of class: ….*sweatdrop*

Tags: