I found out that Lindsey is pregnant. I am going to be a father! We are both a little freaked out by the whole thing.
June 1, 2010
January 15, 2010
-
I hate bills
I don’t like seeing my paycheck dwindle away to nothing.
I know I should get on a budget, but it’s so hard.
December 18, 2009
-
Seven Months of Strange
I haven’t posted since May. What a crazy year!
Lindsey and I were married July 11th, 2009. We spent our honeymoon in Hawaii. It was an amazing experience.
The CT thing didn’t work out as planned. We had some issues with the university, and as such, stayed in Casper. We got a little two bedroom apartment.
My brother got married to Holly Hopkins on October 17th.
I’ll try to fill in more blanks later, and keep up with this better.
ashram
May 18, 2009
-
Conneticut Here We Come!
Lindsey has been accepted into the University of New Haven where she will pursue a master’s degree in Industrial & Organizational Psychology.
We will be moving early to mid-August. I don’t know what we will do between the wedding in July and this move, as far as living arrangements go, but we’ll work something out.
I am very proud of Lindsey, and very excited about the taking this next big step in our lives. Now I just have to find a job and an apartment in CT.
ashram
April 21, 2009
-
Useful Recursion
I have wondered for a long time about what real use recursive functions are besides some comp sci “mumbo-jumbo”. We had made some in my C++ classes, but they were always for examples that could be accomplished much more easily with other, simpler methods.
Well, today I was working on a website and ran into a bit of a wall. When the administrators of the site write a description of a product, they want to show a preview of the description in the digest on a home page. This is so people can know a little bit about the product besides its name, and can click on the product to see a whole page with a full description. We use this kind of system a lot on various sites we create in many different forms, such as a news synopsis. Our designers is love digests, and we coders have to deliver that design.
Examples: www.profloorsup.com or www.adbay.com (I did not design the “look” of these sites, just the underlying PHP code.)
Obviously, I can’t have previews that are the full size of the description. They need to be small, one liners, and we can’t really rely on clients to fill these out well. So, my solution was to trim the string using these two lines of code:
$my_string = substr($my_string,0,strpos($my_string,’ ‘,70));
$my_string = $my_string.”…”;The two functions here are built in PHP functions. The internal one, strpos, finds the position of a string, in this case a space, starting 70 characters from the beginning of the string, and then returns that position. The outside function truncates the string starting at position 0 to the position returned. This makes sure that the string is broken up by words instead of just splitting words in half, because it looks for spaces where it can break up the string. Where this is needed is in product digests. The second line adds the ellipses to the end of the string. The above 2 lines were written by me when I first started this job, and I wisely saved them in a PHP Tools file I created on Google Docs for future use.
Here’s an example of how this worked.
Original 120 Character String:
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec tortor risus sagittis a, tincidunt eu, luctus at, augue.After sending it through the truncation lines:
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec tortor risus…The string has been truncated in between words down to 75 characters, not counting the ellipses.
Well, today I ran into a few problems. If the string is less than 70 characters, PHP will return a warning error. If no space characters are found in $my_string, there will also be a warning error. My first solution only looked for spaces after the specified size. So, if you had a long word like “recursion ” and then a space after the 70 character starting mark, the string you got back would actually be 79 characters long. It became an estimation game to try to choose a starting point that would be small enough that any floating words at the end of the starting point wouldn’t make the preview string too long.
So, after playing with the settings of these two lines and trying some different checks, I decided to write my own function. I had the idea to make it recursively trim the string down to the right size.
//I wrote this function to recursively strip a string down to smaller size, then return it with an ellipses on the end.
//$full_text is the description, and max is the maximum number of characters you want to end up with not including the ellipses. Default: 30
function preview($full_text,$max=30){
//Get the length of the string first.
$length = strlen($full_text);
//If it’s under $max, our job is done.
if($length <= $max){
return $full_text;
}
else {
//We want to break stuff up into words so it looks nicer. Find the last occurence of a space in the string
$position = strrpos($full_text,” “);
//If no spaces are found, we have to trim letters.
if($position === FALSE) {
$full_text = substr($full_text,0,$max);
return $full_text.”…”;
}
else {
//Trim the string to that space
$full_text = substr($full_text,0,$position);
//See if it’s small enough to finish
$length = strlen($full_text);
if($length <= $max){
return $full_text.”…”;
}
//Not small enough, so jump through again.
else {
return preview($full_text,$max);
}
}
}
}If I run my “Lorem ipsum” string in the first example I get this:
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec tortor..A whole word less than my first solution. The total number of characts is 69, not counting the ellipses. This is a much better target number, AND it will never be more than 70 characters, so we can rely on that size to fit into the site design.
It is not super impressive, I know, but it’s the first “useful” recursive function I have written for a real program. It definitely entertained me for 30 minutes or so. Thinking back now, there may even be a built in function that does this. I know there is one that splits words up into an array.
My preview function will start to break down with large amounts of text. Since it basically recurses (is that a word?) at every single space, truncating a large body of text will cause major slow down. I guess next I need to write one that jumps to the middle of the string or just after the max length, and starts there. A hybrid of my two solutions.
This fun kind of “learning/experimenting work” definitely made my day go better, though. Sometimes building the same website over and over and over gets tedious. I like to try things that are new and interesting.
Earlier this morning, I had two moles removed, one from my chin and one from my back. I am extremely afraid of needles, and that was the worst part of the whole experience. The mental picture of him scraping my skin off with a knife, then burning my flesh to seal up the wound was not pleasant either. I could not feel the pain, but I definitely could feel the sensation.
April 16, 2009
-
Almost Perfect
This week I read Almost Perfect, a fascinating history of the word processing software, WordPerfect. It was free to read online, and definitely has some good insights on running a company. Once I started reading, I could hardly stop. I filled up my lunch time each day with this book.
Things with the wedding are coming along. We have a few final details left before we are truly ready. It’s hard to believe the event is only a few months away. I am very anxious!
I need to get to work on my projects.
February 13, 2009
-
Confession: My Tribute to Dragonball
I have to admit that one of my many guilty pleasures is the Dragonball series of anime and manga. While it seems like most of the anime otaku community in America prefers to deny its existence or decry its value, I will be up front and say I love it.
I began watching Dragonball at a time in my life when I had no friends, was living in a new state, and was a shy, high school nerd. I spent most of my time reading and listening to the radio. My younger brother and I had connecting rooms, and often at night he and I would stay up late watching TV in my room. It was on the local Louisville PBS station that we discovered Dragonball. It was actually Dragonball Z that started it all.
We began our experience watching an odd, kung fu guy run along a “snake-like” path in the clouds, in order to get to the next level in his training and save his friends. Back on earth, those friends were fighting against strange aliens who could shoot beams of energy from their bodies and transform into giant, rampaging ape forms. Even his friends were a strange bunch, including a green man with elf ears and attitude, a loud mouth spoiled girl, a boy with a monky tail, and a cowardly samurai.
Aliens, futuristic technology, kung fu, cool violent action, and crazy storylines? My 15 year old geek mind was completely hooked. I think we spent as much time watching this show as we did X-Files and Xena. It was definitely not the first anime I had ever seen(My babysitter used to bring over Robotech when we were very little, and while in Albania we used to watch various anime shows in Italian dub. I think we even caught Ranma 1/2 once without knowing what it was), but it was the first I had gotten hooked on. I have always loved animation since I was young. Saturday morning cartoons were the Holy Grail of my week. I would stay up all night to make sure I didn’t miss a single show. My siblings and I used to swear that we would never stop watching cartoons. We would never group up. We would, even, not be afraid to order happy meals and still play with toys.
I quickly converted my family and many of my friends into Dragonball Z and even anime fans. My uptight cousin who you would absolutely not think might enjoy this stuff was the one of the first to be there with me every time I had some new episodes to watch. She loves it.
Funimation began releasing the DVDs all over again a few years ago, this time in season box sets. Much more affordable. It has rekindled my love for the show.
When I first watched the last episode of this huge series, I cried. I should have been studying for a college test, but I was crying. The show was over. The adventure finished. Sometimes I feel that loss when I finish a good book or book series. A sense of loss overwhelms me, like the parting of friends. I dont’ think I am crazy for feeling this way, because other people I’ve talked to have experienced it as well. I spend time reading or watching these characters, understanding them, watching them change, and really getting attached to them. It hurts to think that there’s nothing left aftwards. I don’t know if there is a name for when this happens or not, but I am sure someone must have described it before.
I’ve spent a lot of time with Dragonball:
- Episodes –
508- Movies (animated)-
20508 episodes at roughly 20 minutes each = 10160 minutes!
20 movies at an average of 45 minutes each = 900 minutes!
——————————————————————————
Grand total: 11060 minutes or 184 hours of Dragonball!Most of it I have seen more than two or three times!
We spent only six months before we moved out of Louisville and away from their PBS-anime goodness. When we came back to Wyoming, the rural, mountainous area provided no access to over-the-air television. My parents have always been opposed to paying for tv in the form of cable or sattelite, so I nearly forgot the show altogether. My grandparents had sattelite tv, however! About a year later, Cartoon Network started airing Dragonball Z episodes. My love was renewed! Cartoon Network’s offerings only served to drag me further into the world of Japanese animation. Gundam Wing. Tenchi Muyo. Blue Submarine No. 6. Outlaw Star. An entire new world was opened up before me:
Animation could have serious storylines? It didn’t necessarily have to be a musical? It could be about any topic or in any genre whatsoever?
This potential is really what attracted me to japanese animation. That pact my siblings and I had made? It could be easily kept without shame(Well, maybe not the happy meals part
). There was respectable storytelling within this medium. There were funny storylines and fantastic adventures and incredible action sequences.
I know I kind of came out of nowhere with this post today, but something happend to me at work. I put Dragonball on while I am working for background noise when I’m tired of my music reserve. As I just said, I’ve watched a lot of it, so it’s not a distraction. I can often picture the scenes in my head without even seeing the video!
Today, I had the last episodes of Dragonball GT playing. Once again, I came to that last episode, and once again I was completely driven to tears. Snotty, rivers of tears. I was shocked at home much this show could still impact me in this way. Yes, I know that the show has ridiculously drawn out fights, cheasy dialogue, and corny moments. But this show really changed my life. It defined a, now, decade’s worth of interest and hobby. It has spurned my creative energy, and it’s burned up a lot of cash as well. It has opened my eyes to a new creative outlet. I realized today I have never really talked about this experience.
I am not ashamed to say I am a Dragonball Fan. I label it proudly with the distinction of my first anime. I will keep on bringing new people to the show.
My fiance, who also enjoys anime, doesn’t like the character designs, and thus, has never watched an episode. I’ll slowly wear away at her resolve, though.
Keep on fighting Goku.
ashram
Special thanks to Akira Toriyama for many years of enjoyment, and the great people at Funimation for bringing it stateside.
December 2, 2008
-
Down Again
Well, my website has been hacked again. With the stagnating community, all these web troubles, and my lack of commitment and resolve to complete this project, I wonder if I should continue. This thing is 3+ years in the works. We’ve had defectors, naysayers, and our problems abound.
I have this vision, though. This idea of what this site and community could be. I don’t want to let go of that.
ashram
November 5, 2008
-
Depressing Day
Well, Obama was elected. On top of that, we have a Democratic majority in the Congress. I’m looking forward to the next 4+ years of economic downturn, socialist expansion, and oppression of Constitutional rights.
On top of that special bit of news, I missed trying again for the Nanowrimo event. I know it only started roughly 5 days ago, but that’s too late for me. I am trying to complete my AoW website by the end of the December, and I knew if I didn’t start writing day one, that it would all be over. Too busy.
I am also broke until next week.
bleh.
ashram
September 25, 2008
-
Fiance & Helvetica & Change of Perception.
Lindsey said YES! It was a wonderful night, and I went home exhausted. In fact I was exhausted and had trouble sleeping for 3 days after. I am very excited that we are finally moving into the next stages of our lives.
At work today, we walked down to the America theater to watch the independent film Helvetica. It was a fascinating movie. I enjoy opportunities to learn like this, especially about technology and design.
There seems to be a layer or layers underneath the my understanding of things that is always just out of reach. It’s a measure of complexity and rules that are beyond me, but somehow visible to the “masters” of each trade. Somehow finding these details drives me to learn more. I understand some of the books and stories that I read and studied when I was younger a lot more now through this sort of awareness.
For instance, reading again Musashi‘s Book of Five Rings is much more enlightening. When first approached, a martial art such as his own could be construed as a simple matter of appropriate movements of the body at appropriate times. However, each “master” of these arts seems to own a world of knowledge beneath each movement, even breath. It’s something you could read about, and talk about even, but until I had truly opened my eyes, I wasn’t really understanding.
It is difficult to fully explain and articulate. I will try more later.
This movie was an example of this, though the process is something I’ve really been going through over the last year and a half, as I seem to narrow my life and career goals into something more concrete. I guess this is just a stage one goes through in life.
ashram
Archives
- June 2010 (1)
- January 2010 (1)
- December 2009 (1)
- May 2009 (1)
- April 2009 (2)
- February 2009 (1)
- December 2008 (1)
- November 2008 (1)
- September 2008 (3)
- August 2008 (2)