Printing out the alphabet quickly with PHP

March 2, 2010 by Stephanie

Yes, I don’t know when you’d have a practical use for this… but it’s still a neat trick!

<?php 
for ($i=65; $i<=90; $i++) { 
$x = chr($i); echo $x;
} 
 
for ($i=97; $i<=122; $i++) { 
$x = chr($i); echo $x; 
} ?>
 

Commuting to work sucks.

March 2, 2010 by Stephanie

Not to be mistaken that I hate working. I don’t. I’m not being lazy.

The bus is suppose to arrive a bit after 8:46. It’s raining out and everyone is huddled in the bus stop cave (or whatever those things are). The bus doesn’t show up until 5 till 9. 10 minutes late.

But who cares. We’re at the train station on time at least. The train leave at 9:12. What? No train at the platform? What? 20 minutes before the next train?

So I stand on the platform for 20 minutes before the train arrives. Train comes. Wait another 10 minutes. By this time, I’m already a half hour late on the commute. Train leaves finally at 9:30ish and talk about the slowest ride ever. Luckily enough, I was able to arrive to work only 20 minutes late. Heh.

 

It’s really about what you know

February 26, 2010 by Stephanie

Recently, I came across a post talking about how every designer that is serious about their profession would have Photoshop. Photoshop is retailing for $699, assuming a full license and not a student one.

I had a problem or two with this.

Photoshop, while great and all for all designers, does not make the designer. Having bought it and invested in such a tool is not equivalent to buying your “seriousness” about your job. If you compare someone who has taken the years to study design, to practice design, keep up to date on concepts, theories and techniques, are you going to call him just the “average Joe” when you compare him to someone who “has dabbled” but has no professional experience or education but has Photoshop on his computer?

Money invested does not equiv to how serious a person is. I can vouch for this fact because I’ve spent a lot of money (probably the same amount that Photoshop cost or more) on 2 guitars and I am FAR from being a serious guitar player. I will make ears bleed if I play guitar. However, if we apply the same concept, I can be considered a very serious guitar player.

Alas people, focus on learning and experiencing new concepts and less so on material things. If you walk up to an employer bragging about your skills and education, it’s much better than a receipt from your local computer store showing you have the latest Photoshop. Powerful tool, yes. Career changer? No.

 

Women to Serve on Submarines

February 26, 2010 by Stephanie

I find it appalling that people are so against women serving on submarines. In the last century, we’ve taken a lot of steps as far as women’s rights and all that. I hear some say that if women wanted to be treated equally, then they should stand up and do the stuff that men do. Well, give women the opportunity now. Everyone is so focused on the possibilities of the rules breaking. Well, the rules have been broken before and it wasn’t the end of the world.

Women to Serve on Submarines

 

PCS, Moving, Home Buying Guide

February 26, 2010 by Stephanie

Here is something I coded up, however, it was more repurposing the general news layout of the site to fit what was needed for this micro-site. I had to rebuild the entire center column while the left and right side columns were mostly reusable.

Check out the live version here.

 

Magic HTML Machine

February 26, 2010 by Stephanie

At my current job, I am a web producer so there’s a lot of formatting articles and then shoving them into a CMS. For the first few weeks of working here, I used to do it manually… one at a time. Then I started using Dreamweaver to do it with the ctrl+shift+p shortcut. One day sitting at home, I created a “tool” to do it for me with some simple regular expressions:

$edit = str_replace("\r\n\r\n","&lt;/p&gt;&lt;p&gt;",$text);

This was all fine and dandy for me but when you work with a company where some people like to copy and paste from MS Word, curly quotes can be an issue. I had opened my tool to a few coworkers initially and after curly quotes were an often enough problem, I implemented a search and replace for that while p tagging the content:

function convert_smart_quotes($string)
{
$search = array(chr(145),
chr(146),
chr(147),
chr(148),
chr(151));
 
$replace = array("'",
"'",
'"',
'"',
'-');
return str_replace($search, $replace, $string);
}
 
$text = convert_smart_quotes(htmlentities($_POST['text']));

Here is the finish product, not fancy or decorated at all since it’s just a tool for convenience.

 

Is advancing your paycheck really that bad?

February 25, 2010 by Stephanie

I’ve googled “paycheck advances” or “payday loans” which, if you haven’t had any experience with them, is a short term loan. I’ve only done it once when I was in a financial crunch. Basically, they give you a limit you can advance (for me, $250). You tell them where you work and all the basic info and after they confirm and that all is well, they direct deposit the money into your account as soon as the next day.

I recieved the money in a timely manner and got through my financial crunch. I had set up my payday (aka payback day) 2 weeks ahead even though I’m paid weekly. I wanted the extra time for the “just in case” situations. However, I was prepared to have that money taken out of my account the very next week and set aside that amount.

I think with financial planning, getting a short term loan isn’t bad if you know you’ll have the income in the near future to pay it back. In this case, it was automatically deducted from my account so it was either have the money in there or be hit with overdraft fees.

Things may go awry if a) you don’t have a stable income or b) you don’t set the amount you borrowed aside as soon as you have it. It’s important to understand that it’s not free money, it’s money you were suppose to get later but needed at the time.

So no, I don’t think they’re bad. I think they’re helpful, especially for a contractor (like me) that doesn’t always get paid on time. :]