Wednesday, March 30, 2011

#uknoyoughettowhen

As a frugal techie, I'm always on the lookout for new frugal tips/practices.  So when I spotted the "#uknoyoughettowhen" trending topic on twitter, I couldn't resist taking a quick peak.  Here are some of my favorites from today:

YOU FILL YO SHAMPOO BOTTLE WITH WATER AND SHAKE IT WHEN IT GET LOW

you eat cereal with a fork to save milk...

U only put lotion on the part of your body thats showin

you can read your haircut.

Some of the techniques twitter users admit to using gave me a good laugh, especially the ones I do myself. Just so they know I'm laughing with them, rather than at them, I'd thought I could share some of the frugal practices I use that may seem a little silly:

1. When it gets really cold in the winter, The only heat source I allow myself is the heat from my laptop.  One of the benefits of having an ancient laptop is the absurd amount of extra heat it produces.  So I just grab my snuggie and curl up in my chair as I work at my desk.  This also has the added bonus of forcing me to do more work than I normally would.

2. I put all the new clothes I get as Birthday or Christmas gifts in a special suitcase. I started doing this a few years ago, when I was still an undergraduate. Most of the clothes I get are too nice to be worn to school, so the clothes put into this suitcase are not to be used until I graduate into the real world. This way, when I finally do graduate, I'll have a whole new wardrobe without having to do any shopping, and my friends will think I got a great paying job!

3. Last silly tip of the day, this one probably doesn't even save me money, but I feel much better when I do it. I bring all my portable electronic devices to campus so I can re-charge them with the school electricity. This includes, cell phone, ipod, developer phones, and kindle.  I just charge them In the lab while I'm doing my work.

What are some of your best ghetto money saving tips?

Sunday, March 27, 2011

Google Presents: Lady Gaga

I got a chance to watch the Google interview of Lady Gaga this past week, and I have to say that I really enjoyed it. I've never been a huge Gaga fan, but I'd probably rank this interview second in the “Google Presents” series on You Tube, right behind the Conen O'Brien interview.  If you haven't seen the Conen interview, I'd recommend watching that one first.  If you're all caught up in the Google Presents series, then here is Lady Gaga.  I've jotted down a few notes you can check out below before you decide to commit to this hour+ long video.



Gaga's Thoughts on Regrets – Lady Gaga got to share a little about how her experience with being bullied throughout high school, stays with her even today. She remembers that when she was young, her natural response was to just be the bigger person, or just kind of shy away from it. Her newest single, “Born This Way” serves as an anthem for anyone going through a similar experience, with the goal of giving them the courage to come out and say “This is who I am, this is who the fuck I am,” rather than hiding.

Despite these memories, Lady Gaga explains that she doesn't hold anything against the people who used to bully her. In fact, she'd rather not obsess over any regrets or negativity from her past.

If you don't cast any shadows, then you're not standing in the light.”

Lady Gaga shared this quote as the best piece of advice she'd ever received. She goes on to explain that she understands that she's not a squeaky clean person, and neither are most of her fans. Nobody can live mistake free if you're putting yourself out there, trying new things, learning your own lessons, and discovering life for yourself.

Gaga's Thoughts on Fashion – Many of her fans had questions revolving around her unique fashion and creativity, asking about what she looks like when shes at home, to how some of her strange music video ideas are born. One of the interesting stories she shares about her fashion choices is that all of her tattoos are on the left side of her body. This was done at the request of her dad, asking her to keep at least half of her body somewhat normal.

Gaga's Thoughts on Fame – Sometimes I think about what it's like to be famous. I wonder about what it's like to be recognized wherever you go, and if it's really as tough on a person as some celebrities make it out to be. Lady Gaga doesn't seem to have any trouble with it. “Anyone who can't get away from paparazzi is full of shit.” And her favorite thing about being famous, “theres always a really good looking guy in my bed.”

So these are some little tidbits from her interview with Google. She is surprisingly down to earth, insightful, has a slightly quirky but great sense of humor. I tried not to spoil too much of the surprises from the interview, so you can check it out for yourself.

Thursday, March 24, 2011

jQuery Fundamentals Part 3: Manipulation

This is the third part of a 5 part series on jQuery fundamentals. In this part, we will look at how to make changes and manipulate HTML element selections you've made in part 2 of this series. The next post will look at events in jQuery.

jQueryUI

Below is an example of a common jQuery statement. You are already familier with the first half of the statement, we will now take a more in depth look at what the second half of the statement means:








The following jQuery methods can be used both as get and set methods, depending on the parameter list when using the method. These methods include .attr, .text, html, and .value

Example - .attr():
/*
 * .attr as a get method takes the name of a attribute 
 * as its parameter. It returns the attribute value of the 
 * first matched HTML element.
 */
jQuery statement: $('div').attr('id')

HTML Page: <div id='divId'>some stuff inside the div</div>

Result returned by jQuery statement: “divId”

Example - .text()
/*
 * .text as a get method takes no parameters. It returns
 * the combined text of all matching HTML elements.
 */
jQuery statement: $('p').text()

HTML Page:
<p>first paragraph</p>
<p>second paragraph</p>
<p>third paragraph</p>

Result returnd by jQuery statement: “first paragraph second paragraph third paragraph”

Example - .html()
/*
 * .html as a get method takes no parameters. It returns
 * the HTML of the first matched HTML element
 */
jQuery statement: $('.yourDiv').html();
HTML Page:
<div class="yourDiv">
  <div>Stuff in a Div</div>
</div>
Result returned by jQuery statement: <div>Stuff in a Div</div>
Example - .val()
/*
 * .html as a get method takes no parameters. It returns
 * the HTML of the first matched HTML element
 */
jQuery statement: $('input').val();

HTML Page: <div input >

Result returned by jQuery statement: whatever the user has typed into the input field

The methods we have just covered can also be used as set methods. The following methods are the exact same methods we've just covered, the only difference being the modified parameter list, changing the behavior of the method from a returning a value to setting a value.

/*
 * .attr as a set method takes two parameters. The first 
 * parameters is the name of the attribute you want to set. 
 * The second parameter is The new value you would like 
 * to set that attribute to. In this example you are setting 
 * the ID attribute of all “&lt”;Div”&gt”; elements to 'newID'.
 */
.attr() Example - $('div').attr('id', 'newID')

/*
 * .text as a set method takes a string as its parameter.
 * In this example we are setting the text of all “&lt”;p”&gt”;
 * elements to “some new text”.
 */
.text() Example - $(“p”).text(“some new text”)

/*
 * .html as a set method takes the html markup as its 
 * parameter. In this example we are setting the text of all 
 * “&lt”;p”&gt”; elements to “some new text”.
 */
.html Example - $(“div”).html(“
a new paragraph
”)

/*
 * .val as a set method takes a string as its parameter.
 * In this example we are setting the text of an input field 
 * to, “new value”.
 */
.val() Example - $(“input”).val(“new value”)

These are most of the basic jQuery methods, its important to note however that there are many many more methods available in jQuery. For example .append(), .appendTo(), .after(), .before() are all very similar to .html() but with some small differenences to where the html is inserted relative to the selected HTML element. Please refer to the jQuery API for a complete reference

Sunday, March 20, 2011

Problems With a Frugal Lifestyle

I've now been a student for six years at the University I'm attending. That's right, six years! Most of my friends have already graduated and moved on to great jobs, and I can't wait to do the same. I can already feel the anxiety just thinking about all the resume building, job searching, interview preparation, and social activities standing between me and my dream job. I actually look forward to knocking these things out of the park, but until then I have a much more urgent problem on my hands.

Now that a lot of my friends have money, I feel like I'm holding them back from a lot of the things they want to do, because I can't afford to keep up.

The guilt from this problem gives me one of the most horrible feelings I've had in recent memory. I feel cheap, I feel like I'm letting my friends down, and I fear they will eventually get fed up and resent me.

Although it feels like this little problem has grown larger than something I can handle, I thought I'd share some of the tricks I've picked up that have helped me cope with this problem up until now.

Journal – The first part of the problem is the most important. When this little issue gets me down, I'm in no state to get back up and make things better for myself. That's what my journal is for. I keep two journals, my “Thankful” Journal is where I jot down any little item during my happiest moments. The Journal I turn to during this crisis however, is my “Pride” journal. This journal has all the little compliments or positive comments friends might through my way during the day. Here are some examples of my most recent entries:

-”Your reverse layup is unstoppable dude” - baller friend
-”That color looks really nice on you” - dorm mate friend
- “You're off to a really great start” - web camp partner

These little pick me ups remind me that I have at least some things to offer, and now I'm motivated and ready to show my friends I care.

Take Charge – Instead of having to shoot down a friends invite to expensive dinners and movies, I try to step up and invite others to my own events. My recent favorite is inviting a few friends over for board game night (extra fun with alcohol). Cranium, Taboo, and Poker have been fun lately. Note* please no monopoly, that game will only lead to disaster.

Common hobbies create another easy opportunity for inexpensive but fun hangout time. A bunch of buddies and I play basketball about twice a week, and another friend and I have guitar jamming sessions every once in a while.

If you have some serious organization chops, setting up a house dinner rotation could be tons of fun, and a huge money saver. Maybe two people take care of the cooking per rotation, and everyone else takes care of entertainment, maybe a movie, or game. It's all up to you.

Don't forget to check out your local library and University for event listings. They often have great opportunities at reduced rates.

Don't Worry – My last advice is more of a “do as I say, not what as do,” kind of tip. Just try not to worry, you're still fun even if you turn down a few outings here or there. Just invite them over to hang out at your place next time. If they are the kind of friends worth keeping, they'll gladly come over and watch free Hulu documentaries on your 13” laptop screen in the room you rent out of a house with no furniture.


Wednesday, March 16, 2011

Ideas of March

Chris Shiflett, one of the bloggers over at Planet PHP, has been observing that many of the interesting conversations that used to take place on blogs, has been moving to more “quick hit” type outlets such as Twitter and the Stack Overflow. While these sites can offer participation at higher levels in conversations that happen much closer to real time, it's much harder to match the deepness of thought that can be expressed in a blog.

So where have all the bloggers gone!?

Ideas of March is the initiative started by Chris Schiflett, and supported by many of the other bloggers at Planet PHP, to revive blogging. The idea is simple. Create a blog post called Ideas of March that lists some of things you like about blogs. Pledge to blog more in 2011 than you did in 2010. Then spread the word!

There are two main reasons why I personally love blogs. I first became hooked on blogs when I discovered The Simple Dollar back in 2007. I instantly connected with Trent's personal message and conversational writing style. The intimate stories from his own personal experience drive home important lessons I would otherwise fail to take seriously. I also enjoying knowing that there are thousands of other readers out there sharing the same silly passions that I have. Since then I've discovered many more blogs covering my wide range of interests including personal growth, productivity, coding, gadgets, music, and of course sports.

The second reason I believe in the blog, I've only discovered very recently. I've often felt that I have a lot of interesting things to say about certain topics, but no way to express it. I've never been a very good public speaker, I could never capture an audience, In some cases I can barely speak off the top of my head in one on one situations. I'm the kind of person who has to focus so intensely on what to say next, that I can go through an entire conversation without remembering a single sentence that was said. Blogging gives me the perfect outlet for my ideas. The uninterrupted time, and stress free environment of blogging, allows me to formalize my thoughts and write it down in a semi-coherent form. Many times, writing a blog post can make me realize I don't understand a topic nearly as well as I thought I did, and force me to go out and refine my thoughts. Even though I've only been doing this for a few months, I really do enjoy being a content creator in addition to my main role as content consumer.

Now for the pledge, it wouldn't be very impressive to say that I'll blog more this year than last, so instead I will pledge to put in the time and effort to contribute to the revival of the blog cause. Your turn!

Sunday, March 13, 2011

jQuery Fundamentals Part 2: Selection

This is the second part of a 5 part series on jQuery fundamentals. In this part, we will look at how to make HTML element selections using jQuery. The next part will focus on how to manipulate these selections. This easy method for selecting and manipulating the DOM is one of jQuery's most valuable strengths.

jQueryUI

Below is an example of a common jQuery statement followed by an explanation of each section of this jQuery statement. This first part of the “jQuery Fundamentals” will focus on the selection part of the statement below:








jQuery Object: Any jQuery action starts with the '$' character.  Starting a statement with the '$' character lets you know that you are working with a jQuery statement.  Alternatively, you may also replace the '$' character with the word 'jQuery' if you want your code to be more explicit.    

Element Selection: select an HTML element from the HTML document. This example selects an element with id = 'exampleDiv'.  We will go into more detail on how to make these selections shortly.

Action: After making a selection, you probably want to perform some action on the selection. This example adds a CSS class to the 'exampleDiv' selection.  There are many actions that jQuery is able to do.  Some of my favorites to use include .addClass, .html, .val, .append, and .ajax().  We will cover most of these in Part 3 of this series.

Parameters: If the jQuery method takes any parameters, they go here. This example adds the CSS class 'exampleClass' to the exampleDiv selection.

You can select your HTML elements in a number of different ways. You can select by CSS class, ID, element type, or any combination of the three.

Selection by Element:
/*
 * This statement selects all of the Div elements in an HTML document.
 */
$(“div”).AddClass(“exampleClass”)   


Selection by Class:
/*
 * This statement selects all HTML elements with a class of “exampleClass” 
 * attached to it, then adds some HTML. Note that selection by class requires 
 * a “.” prepended to the class name.
 */
$(“.exampleClass”).AddClass(“anotherExampleClass”) 


Selection by ID:
/*
 * This statement selects all HTML elements with an id of “exampleID”, then 
 * adds some HTML inside of the selected tags. Note that selection by ID 
 * requires a “#” prepended to the ID name.
 */
$(“#exampleID”).Html(“someHtml”) 

Selection by Combination:
/* 
 * This statement selects all HTML elements with an ID = 'exampleID', that 
 * also have the class = 'exampleClass' which are contained within Div tags.
 */
$(“div .exampleClass #exampleID”).AddClass(“exampleClass”) 


The next part of this series will be on how to manipulate the selections we have just learned how to make.


Wednesday, March 9, 2011

How to Handle Failure

As you know, I've been trying to get my first Windows Phone 7 app in the marketplace for some time now. The app I've been working on converts a number from one unit to another. It's a very simple idea as a first attempt, but I've put a lot of effort into it, and I'm proud to announce that it's finally made its way into the marketplace. Now for the bad news, this short lived high came crashing down on me when I decided to check out my download stats and found that not one person has downloaded my app. Now, you can imagine how disappointed I was, we are often our own harshest critic and a lot of different thoughts can start creeping into your head, I'm not good enough, it was silly to even think I could do this, I don't deserve to succeed at something like this, why bother?

The thing is, my experience has taught me that this cycle of highs and lows are just a part of life (at least for me it is). You think you're making progress with a girl you like only to have her tell you what a great “friend” you are, you think you're starting to get really good at playing the guitar until you watch a youtube clip of some kid playing at a skill level you can only dream of, or you knock off all the items on your to-do list one day only to fall into the trap of doing absolutely nothing the rest of the week.

I hate disappointment just as much as anyone, and I used to let that fear of failure paralyze me from doing a lot of normal things like speaking in public, or talking to girls. This latest failure has been particularly disappointing, but has reminded me of some of the things I've picked up over the years that help me deal with disappointment and overcome my fear of failure.

Failure means you're brave – There are very few things in my life that I consider completely within my comfort zone. For everything else, there is some amount of anxiety to overcome. When I fail, I congratulate myself for having the courage to act despite that fear. So what if I told a girl I like her, only to have her laugh in my face, at least I tried. If I do this 100 more times I'm bound to stumble into success at some point right?

You miss 100% of the shots you don't take” - Wayne Gretzky.

Failure means you've learned something – There isn't one thing in my life that I've done perfectly the first time I tried. It took interviews with 11 different companies before I could land my first internship, I've been rejected by girls more times than I'd like to admit, and I've spent countless hours re-explaining concepts I've poorly described the first few tries (I work as a tutor). The point is, that I feel confident in these areas now because of the numerous failures I've had with each. It's not very hard to identify what went wrong, and avoid the same mistake the next time. Use each failure as a stepping stone towards the final outcome of success. Each time you make a class presentation, keep what worked, throw out what didn't work, and repeat until you're the greatest public speaker on earth!

I have not failed. I've just found 10,000 ways that won't work.” - Tomas Edison on the first 10,000 materials he tried to create a light bulb out of.

Failure means you're on the way up – No matter how many reasons I give to make failure look like a good thing, I know that it's still tough to take. It' so easy get really down on yourself when things don't go the way we envisioned. Don't be tempted into believing that it ends here. In fact, failure is only just the beginning. As the failures and disappointments keep piling up, I've come to understand that failure isn't really a big deal, it's just part of the process. At this point, we've already established that you have the courage to keep going. You'll have to trust me on this one, it feels great to keep working at something that's hard, especially once you start seeing progress.

Never let the defeat of the past rob you of the success of your future.” - Ray Comfort





Sunday, March 6, 2011

jQuery Fundamentals Part 1: Introduction

As promised, I finally got around to posting about my jQuery favorites. The only problem is that this post started to grow so long with awesome jQuery techniques, that I decided to break it up into a series. This is the first of a five part series on jQuery Fundamentals.

jQueryUI

The Problem

The differences between the way different browsers implement AJAX technologies such as working with xmlHttpRequest or DOM objects makes it difficult to write, debug, and maintain code that works smoothly across multiple browsers. A simple solution to this problem is to wrap these coding details in a javascript library such as Dojo, YUI, Protoype or jQuery!

What is jQuery?

jQuery is a Javascript library that abstracts the minor differences between each browsers AJAX implementation so that you can write one set of code that works across every browser. jQuery allows you to traverse the DOM, handle events, perform animations, and add AJAX interactions into your web pages without having to worrry about cross brower compatibility. jQuery is the most popular javascript library in use today with big players such as Google, Microsoft, Amazon, Twitter, Dell, Mozilla, Wordpress, Drupal, HP, and Intel all buying into and using jQuery on many of their projects.

Getting Started

jQuery is open source and free to use in any project you may be working on. You can include and use the jQuery library locally by downloading the 29 kb file here, or you can include it through a CDN such as Microsoft or Google.


In addition to the default jQuery library, you can also include and use any of the hundreds of plugins written for jQuery found here plugins.jquery.com/. In the last part of this series we will work with jQueryUI and jQuery Themes.  

Wednesday, March 2, 2011

Finding More Time For Your Passions

Everybody has interests and hobbies outside of work or school they wish they had more time for. For example, I wish I had more time to learn the guitar, create cool mobile apps, and read about personal finance. Here are my best tips for getting the most out of the time spent at work, so you have more time to spend on the the things you love.

Start as early as possible – The biggest reason for this is momentum. Completing that first task off your to-do list, and then the next task, and then the next, creates momentum for you to keep knocking things off your list throughout your day. On the other hand, procrastinating in the morning creates momentum that pushes you to keep checking facebook or watching youtube, while your work just sits on your desk all day. Even if you feel you work much better during evenings, try getting a jump start for a week, and not allow yourself an email or facebook break until you knock those first few items off your list. You may be surprised by the results.

Get enough rest – Do not underestimate the power of sleep! When I was an undergraduate student, I remember how most people (including myself) would compare how many hours we spent studying for a test, only to find that some of us just couldn't break past that B+ barrier no matter how many hours we spent studying. After a couple years I finally figured it out, Instead of forcing myself to stay up all night studying, I could get a good night of sleep and spend about a third the amount of time studying in the morning. Studying with a well rested mind means no spacing out while reading, only to find that you just read an entire paragraph without remembering a single line. It means staying awake and alert during class, not needing to waste time re-learning material outside of class, and it means having more energy to focus on your work, instead of focusing on staying awake or wishing you could go to sleep. Working with a well rested mind has allowed me to finish in one hour, what it would take me to finish in three hours with in a tired state.

Capture everything before you start – Have you ever been happily chugging along, working on a project when suddenly you remember you need to stop by the bank, or call your mom back later that day. These little distractions can turn into major setbacks if they can break you out of your zone. To prevent this, keep a to-do list with you at all times and dump everything you may need to remember onto your list before you start any kind of major work. Everything from emails you need to send out later, to what you need to pick up from the grocery store on the way back from work. Keeping all these items written down will free up any brain power being used to keep these little items from being forgotten, and stop any brain pop-ups from throwing off your focus.

Force yourself to do the worst thing first – This one may be debatable. Some people prefer to start on the hardest items on their list first, while others prefer to do the easiest tasks first just to get going. Here is my case for starting with the worst thing first. It's much harder to stay focused on an intensive task after a long hard day. Instead, using all your energy on high focus items in the beginning of the day leaves the mindless tasks, such as cooking, cleaning, or other repetitive tasks, for you in the evenings, prolonging the amount of productivity in your day.

Force yourself to do it at least 15 min – We all have days when our motivation tanks seem to be on empty, and we reluctantly give in to what will probably be another lost day of production. I'm going to give you my best tip for battling against these times of low motivation. Force yourself to work on a task for just 15 min. Do whatever it takes to get to you desk, turn off your TV, turn off your cell phone, don't even open up your laptop until you can to your desk. If you can open up that project, and keep it open for just 15 min, I can't tell you how many times I look up, and what was supposed to be just 15 min had already turned into an hour. At that point I've got some momentum and I just keep going.

Make it a routine – Trying any of these previously mentioned tips the first two or three times can be the hardest part. Making it a routine will make it much easier without even thinking about it. Try this: pick one or two of these tips to start off with. Making too many changes at once makes it too easy to throw away progress with all the positive changes you've made after slipping up with only one of them. Grab a marker of your favorite color, and make a mark on your calendar every day that you follow through with the two tips you've chosen. Studies have shown that it takes around 28 days to forge a new habit. If you can put together a string of 28 days on your calendar, then you're done and you can move on to the next tips you would like to implement. The key here is to keep the calendar in a place where you can see it up at ALL TIMES. Your gmail calendar is not good enough, even if you open it everyday. And remember to only attempt one or two changes at a time.