Monday, October 31, 2011

Stanford Database Class: Part 2

Goodness me. The student in me just kicked in and could not stop until I got all answers correct and submitted. It took me two days of pure mind numbing logic to finish the homework for the Stanford database class. Relational algebra's fun to a point where the homework says "this is REALLY challenging, so be really proud of yourself if you get it right" or something like that. So I got all of the homework done, but it was really ugly. I really hope it doesn't get worse than this. Also I hope the midterm and final is unlimited in time because I don't know if I can think that fast to solve all the problems. Really hope that we get to use the validator and all the tools in homework.

Anyways, I haven't been able to do python in weeks, which bums me out but it's that or complete sanity. Work's been really heinous and on top of that is this class and other activities. I should learn how to limit my activities, but that wouldn't be me now would it?

I may or may not do something tonight as I am getting over a huge headache and stomach ache. I can only think how much longer I can keep up till my body completely doubles over. Health first right? RIGHT!

Hopefully will get around to doing a little bit in the next couple weeks.

Thursday, October 20, 2011

Stanford Database Class

I decided to take the Introduction to Databases free online class thinking that it might be interesting considering I work with databases for the applications I support for work. I was close to just backing out since there seemed to be a lot of work for the class, but apparently there's no penalty at all for just not doing the work. So I decided, why not. If I have time, I'll do the work. If I don't, it won't hurt me, but it'll just skew the stats they're gathering for this experiment. Well it's Stanford also so I can skew all I want. Go Bears!

So I'm listening to the professor talk. She sounds a lot like Ellen Degeneres. I did the first XML quiz last night and it took me about half an hour since the questions were multiple choice and had symbols which were not covered by the lectures. I appreciate them wanting us to do a little more learning past the lectures, but man it was late at night and my brain power was at an absolute minimum. Today I decided to tackle the DTD writing and I might say, I like writing these things. Albeit that the XML file they were providing was so big and without having to do trial and error, I don't think anyone would've gotten it in one shot unless they really looked at the file closely. Good thing there was validation prior to submission.

Right now I'm learning about Relational Algebra and getting quite a kick out of it. Reminds me a lot of Chemistry. I find it oddly fun and interesting. I know I'm a nerd. I think this final quiz is going to be a breeze as I've passed all the mini quizzes in the lesson so far with flying colors.

If you have any time on your hands and want to learn about Databases, this class is at a comfortable pace so far and not too late to join of course: http://www.db-class.org/

You get a certificate of completion (if you complete it) at the end and a wealth of knowledge that will stay with you forever....ever....ever. :) Though for me it's more for making sure my brain's not deteriorating and that I'm possibly still smart in there.

Anyone else out there taking this class? What do you think?

Monday, October 10, 2011

Quiet Time

I know I didn't end up doing much coding this weekend except for the jumble game, but I needed a little break due to sickness. I've been a bit under the weather (though not completely visible) and I've been feeling exhausted the whole week regardless of the amount of sleep I get or try to at least. Today's going to be hectic with work and another Girl Geek Dinner (this time with Microsoft!). I do have Friday as a day off, so expect another post then! Until then...

Good night world.

Saturday, October 8, 2011

Coding on a Saturday Morning

I woke up pretty early today. Not particularly sure why, but I just couldn't go back to sleep. So, I decided to get up, run the heater, put on a bad movie (in this case it's "Four Christmases"), and code that Word Jumble program. Here it is:
The book does a good job explaining all the bits and pieces of the code, but I'm not 100% sure if I would be able to write this myself. I think what I'll need to do next is do the challenge sections so that I can code without a cheat sheet!

Here's the first challenge this chapter. I needed to write a program that asked for a start number, end number, and a number to count by from the user and print it out.

Second challenge is to get a word from the user and spell it backwards:
What I found challenging regarding this was how to use range and splicing. I couldn't figure out which way to count and which to do and was getting frustrated in seeing my first attempt having the index being out of range. So what do I do? I decided, let's print out what the 'i' is and see what's going in. After that it was smooooooth sailing. Huzzah!

It's funny, through this experience so far, I got easily frustrated, but thought of a different way to figure out the issue and I would get it right. It's the whole programming and debugging process that's actually making this enjoyable. I guess that's why I liked correcting other people's code. Being able to debug and fix and figure out the issues folks were having and being able to help them out. Well there was the additional helping people aspect that made me feel accomplished? No that's not the word. It's rewarding.

Well that's it for this morning so far. I might do more and another post will come its way.

Hello world and good morning.

Thursday, October 6, 2011

Loop de loop

As I'm feeling worse than I was yesterday, I decided. Let's keep going on Python. I know. I'm crazy. Right now the thought of not making Silicon Valley Code Camp is bumming me out since I'm getting sicker by the minute.

Anyways, onto for loops, strings, and tuples!

What I find pretty nice is that the for loop for Python is super flexible. You can use it to traverse a word and it would stop at the end of the word.  It also pretty simple and straight forward.

for <variable> in <range>:
   DO SOMETHING!

So you can do something like:

for letter in word:
   print letter

This will print each letter on a separate line of the word. So simple!

OMG you can do "in" statements too to do comparison. It's like heaven. Built in! So you can say

if "a" in phrase:
   print "There's a letter 'a' in your phrase."

I use "in" in SQL all the time. It's like crazy nuts. OH...well you can only use single characters for "in."

Indexing is a little weird. So say:

word = "Flouncy"
print word[-2] --> c

That's right you can do negative indexing. That's just weird to me as it's not standard to what I've learned. But what's crazier is slicing with negative and positive indices.

print word[-4:5] --> un

Get it?

Tuples is just a list, but unlike other languages, it's not restricted to be one type of list. So you can create tuples with integers, strings, candy, muffins, pie...I guess I'm hungry.

I'm actually super sleepy, so I'll have to code this chapter's work another day. Good night world.

God Speed Steve Jobs

Yesterday, I drove home and was getting ready for the Journey & Foreigner concert when I get a voice message from my gal pal. She's like, "I just heard Marcus D say that Steve Jobs is dead." I was standing in front of my mirror putting on concealer as I heard this message. It was shocking. Part of me thought, it can't be. He JUST left his position as CEO from Apple. But I guess his cancer was much worse than we had thought. I bet Steve was a very proud man and didn't want the world to know how severe his sickness was. He probably also didn't want to have any pity. So I hope he had a quiet and unpainful death as no one wants to die in pain. I hope that he also was surrounded by all the people he loved.

I remember the first time I had a computer. It was my cousin's Apple IIe. I played some type of summer games video game on it. Then in school we would have computer lab and play on macs. I would say Spellavator, Oregon Trail, and Carmen Sandiego were my top games. Macs were very prevalent in my younger life and less in my older as they were too expensive for my family. I just recently purchased my Macbook Air and about to embark on my journey to iPhone development.

I think yesterday is and will be remembered by all those in technology. You'll remember where you were and how you heard it.

Steve Jobs was a vindictive man with many dreams who made them come true at any cost. I can only strive to be a dreamer as he was.

God speed Steve.

Tuesday, October 4, 2011

Completing the while loop...

So I decided to finish off the third chapter and completed the Guessing Game program with while-loop and branch statements. Let's say I took my liberties again on what the text should say:
I'm finding that coding then debugging has been oddly therapeutic. Okay, not really therapeutic, but it's been a great feeling to get it working especially since it's something I wrote and want to make run properly. I know the frustration has yet to hit like during school, but the end result has always been rewarding when everything works.

I haven't really settled on what bigger project I want to write in Python, but hopefully it's something that will help me. I thought about something silly like automating my Radio Alice rewards points activities. It could be interesting.

We'll see...

Anticipating the iPhone Announcement!

As I'm still sick at home, I might as well make my day worth it!

Currently watching the live blog on Engadget:
www.engadget.com/2011/10/04/apples-lets-talk-iphone-keynote-liveblog/

"Let's talk iPhone" is the banner so I guess it's just all about the iPhone today. I'll update this as I see more information on the page.

I find the stats that Tim's giving a bit skewed regarding user adoption of Lion vs. Windows 7. I think the user adoption rate is definitely due to the # of folks who have a Windows machine and most of them won't upgrade just due to cost. Your typical Mac user has probably a butt load of money and is more likely willing to upgrade than Windows users. I know I have never upgraded to a new Windows operating system just because I can and I don't want to spend too much money. What's a little sad is that Mac actually forces you to upgrade at a point. My mom's iMac can't download the new iTunes because it's "too old." Anyways, that's just my gripe.

iPhone only cover 5% of the worldwide market. That surprised me initially and then realized, wait, that's true. It's more likely someone has a normal phone than it is a smart phone. Also in Asia, Apple products are so expensive that they'd probably likely to get another brand than it is the iPhone. Another factor is that most international folks use the phone to text. That keyboard is not efficient.

Cards, that would be useful. They're outsourcing card sending. $2.99 for local and $4.99 for international.

iOS 5 feature that I'm excited about is iMessage. When I had a Blackberry, BBM was so convenient. Reminders is going to make productivity consultants pee in their pants. Being able to use location services to remind you that you have an errand to do where you're at. Be still my productive heart.

iOS & iCloud will be released October 12th! Free 5GB of storage, not that much but enough for those who want to share between Mac products. This whole Friend Finder is just a "Stalk a friend" deal. I'm glad you have to opt in to share your info. So it's not that much different than the whole Google Latitude.

iTunes match is interesting. Would you really pay $24.99/year?

iPod nanos have definitely evolved into a great smart design. I really want one and make it a watch. I'll definitely have to start a "nano buy fund" one day. Oh yay! Price drop! $129 for 8GB and $149 for 16GB.

iPhone 4S...kind of sad right now. So it looks like the iPhone 4S - 7 times faster in terms of graphics due the dual core processor (has the A5 chip - 2x faster in terms of processing) 4S will offer eight hours of 3G talk time. Six hours of browsing, nine on WiFi. 10 hours of video, and 40 hours of music. It has both CDMA & GSM which means you can now take your iPhone globally. New camera - 8 megapixels. 1080p HD video camera. Wireless mirroring so you can play or show images from your iPhone and project it to the tv (like the new Wii). New digital assistant called Siri. Hold down the home key and talk into the phone to ask. Pretty cool as you can ask it to set your alarm clock by just talking into your phone and saying "Wake me up tomorrow at 6am". This thing is powerful. Ask it for directions, find restaurants, reply to text messages just by voice. Siri's seriously powerful. It sets up calendar events and it's smart.

Siri will change how we use the phone. No more typing or clicking or touching, just all by voice. I thought this day would come a while back. Well here it is. This is going to help me a bunch now that I have issues with prolonged typing. It's like Dragonspeak, but better!]

Still waiting on pricing and carriers...
Pricing: Black and white versions 16GB: $199, 32GB for $299, 64GB for $399 with 2 year contract

iPhone 4 - $99 w/ 2 year contract
iPhone 3GS - Free with contract

Preorders start Oct 7. Orders out by Oct 14th. Available on AT&T, Verizon, & Sprint.


This is insane. All three carriers. I think AT&T will see people start jumping ship. 

There's definitely more information that you can find on Engadget and on other technology sites. Thanks for stopping by as I'm experiencing the news at the same time and giving my reaction to it.

Now I need to figure out if I want to get a new phone and which carrier to go to.





Monday, October 3, 2011

Still easing into coding...

Okay, I'm not sleepy, so I'll keep going with Python tonight. So far it's still nothing new.

The next code is about learning modules. So here's our good friend random. Random has a function called randrange(n) which takes in an integer and provides a random number starting from 0 to n-1. So since this coding assignment deals with dice then you need to add 1 to the result from the randrange function. Seems simple enough.

Next is about branching and conditional statements. Now here's something interesting. Python recognizes blocks of statements by indenting. So Python forces you to indent if you want them in the same code block. Good practice in my opinion. I hated it when students would not pretty print their assignments, especially in Scheme when you're surrounded by an endless sea of parentheses. At least with Java and C++ you can bracket off areas, but even then you can get away with not indenting. Bravo Python. (I might hate it when I start doing more complex code). Oh fun! If-elif-else! Now that's some fancy naming (or lazy naming).

I guess I am getting tired for the night. I'll have to stop at the while statement and will have to code another night.
*Okay, I did a quick if elif piece of code. Yay for random song references!*




The Eve of the Apple Announcement

On the eve of the Apple press conference tomorrow, everyone's buzzing regarding the iPhone 4g or iPhone 5 or even an iPad upgrade to battle with the Kindle Fire. Either way, I need an upgrade and have been waiting for this announcement since my prehistoric iPhone 3G lost all its location capability. You know how hard it's been not to be able to check into places on Yelp? I lost all my kingdoms due to it! Also all the goodies that come into checking into some locations. I digress. It will be interesting to see Steve Job's predecessor and how he'll take to the limelight that is Apple.


My coworker showed me this video on YouTube. I only hope it would be as cool. Come on! Holographic images, projected keyboard... One day this will happen!

I should go to sleep and rest as tomorrow will be an exciting day.

Saturday, October 1, 2011

Slithering through day 2

Going through Chapter 2 right now for Python and nothing's completely out of the ordinary for me regarding Python. String concatenation's straight forward with the + sign.

Some new concepts did pop up though:
  • '\' is not only an escape character but can be used at the end of any statement so that you can extend a statement to several lines 
  • Using the multiply symbol (*) and # with a statement repeats the statement # time
  • Using triple quotes can save multiple print statements and special characters as it takes whatever you put between the """ verbatim.
  • To have two consecutive print statements on the same line you can suppress it by putting a comma at the end of the first print statement.

I got to create a Greeter program and learned how to use a variable. Let's just say I took some liberty to changing the version which was in the book:
The rest of the chapter covered using entered data as numbers instead of strings using the int() function. Then also knowing when to use + and , when concatenating strings vs. ints. Got through this chapter pretty quickly as the examples I didn't feel like I need to completely do, but just get the gist of. I was able to do the couple pieces of code above just to get a feel of how to do it.

Python is starting to feel pretty powerful with just these simple examples above. Next time I get to learn about branching, while loops, and program planning! Oh joy! <Insert sarcasm here> (I kid, I am having a fun time learning.)