Paul Mendoza C# blog
Tuesday, December 27, 2005
  First Ruby on Rails moment
I installed Ruby on Rails tonight and played around with it for a bit. Actually, I just got the server working and thats really about it so far. I then downloaded MySQL but I actually already have it installed for Apache but I'm not real sure how to make it access that version so I'm going to do a new install of it.

I'll be working with Ruby a lot more tomorrow to see what I can learn and figure out if it is actually better than PHP for what I'm doing.
 
Saturday, December 24, 2005
  Quotes
"Premature optimization is the root of all evil (or at least most of it) in programming."

- Donald Knuth


"Guy Steele leads a small team of researchers in Burlington, Massachusetts, who are taking on an enormous challenge-- create a programming language better than Java."

- Sun.Com
 
Friday, December 23, 2005
  Firefox vs. ID
Everything I try works in Firefox for the most part. Like things that make sense to make just work in it. I try to build an array in PHP and pass it to Javascript with the proper formatting so that it looks like a Javascript array and it doesn't really work but at least it prints. IE, no freaking way. Doesn't even try anything.

I have so many issues with IE whereas Firefox just works so well. I never have issues with Firefox but I'm constantly tweaking things to get something that works perfectly in Firefox to work in IE. I've even had to rewrite entire chunks of code that worked amazingly in Firefox but bit the dust hard in IE.

WHY! Why cant browsers just hand javascript the same! I dont understand!
 
Wednesday, December 21, 2005
  Two and a half days
Two and a half days.

that's how long it took me to complete a simple page that's supposed to save time when entering data into our website. Actually, with the way that data is arranged in the database, I think it'll save us a lot of time and headaches in the long run so I think it was well worth it.

Every day I work with PHP, I like it more and more. It really is nice in the ways that I'm not required to declare variable types all over the place like in Java or C#, the two languages I've worked with a lot in the past. I still have to in my Javascript that I'm writing but its never more than typing "var" and variable name instead of having to pick types which although its not a problem knowing which to pick, using them later on can get confusing.

I'm trying to decide what to work on next for the site. There are so many places I could start on I just don't know which would be the best place to start that would launch me through the rest of the project.
 
Tuesday, December 20, 2005
  Ten commandments for coders
Ten Commandments of Egoless Programming - (Lamont Adams, Builder.com | Sunday, July 14 2002)

1. Understand and accept that you will make mistakes. The point is to find them early, before they make it into production. Fortunately, except for the few of us developing rocket guidance software at JPL, mistakes are rarely fatal in our industry, so we can, and should, learn, laugh, and move on.
2. You are not your code. Remember that the entire point of a review is to find problems, and problems will be found. Don't take it personally when one is uncovered.
3. No matter how much "karate" you know, someone else will always know more. Such an individual can teach you some new moves if you ask. Seek and accept input from others, especially when you think it's not needed.
4. Don't rewrite code without consultation. There's a fine line between "fixing code" and "rewriting code." Know the difference, and pursue stylistic changes within the framework of a code review, not as a lone enforcer.
5. Treat people who know less than you with respect, deference, and patience. Nontechnical people who deal with developers on a regular basis almost universally hold the opinion that we are prima donnas at best and crybabies at worst. Don't reinforce this stereotype with anger and impatience.
6. The only constant in the world is change. Be open to it and accept it with a smile. Look at each change to your requirements, platform, or tool as a new challenge, not as some serious inconvenience to be fought.
7. The only true authority stems from knowledge, not from position. Knowledge engenders authority, and authority engenders respect—so if you want respect in an egoless environment, cultivate knowledge.
8. Fight for what you believe, but gracefully accept defeat. Understand that sometimes your ideas will be overruled. Even if you do turn out to be right, don't take revenge or say, "I told you so" more than a few times at most, and don't make your dearly departed idea a martyr or rallying cry.
9. Don't be "the guy in the room." Don't be the guy coding in the dark office emerging only to buy cola. The guy in the room is out of touch, out of sight, and out of control and has no place in an open, collaborative environment.
10. Critique code instead of people—be kind to the coder, not to the code. As much as possible, make all of your comments positive and oriented to improving the code. Relate comments to local standards, program specs, increased performance, etc


I thought this was an interesting list. Hope you all enjoyed it.
 
Saturday, December 17, 2005
  Full time on Glicky now
During the last couple days I've been working full time on Glicky now that school is out and I'm getting quite a bit accomplished but its taking longer than I thought for many of the tasks. I am definitely getting good with Javascript and PHP now. Far better than I was just a month ago when I started using them.

I just finished debugging a page that's pretty close to having all the logic complete for it. I was having an issue with a SQL statement and retrieving some data from the database that I needed so that I could then read that data into another SQL statement. There might actually be a better, more efficient way to do that but at this point, I'm using what I know how to do.

I don't know if this is the right design mentality but I generally just think "We'll fix it when its a problem." I'm sure right now my code doesn't run as optimally as it could but since just getting it working seems like a grand feat, I'm just not that worried about whether or not it runs amazingly fast. Besides, it's probably only taking a quarter of a millisecond longer than normal to submit the request anyways.

Okay, I'm off to bed. Tomorrow I'm helping Carolann and Chris move Carolann into her new apartment down in San Diego. See ya later!
 
Tuesday, December 13, 2005
  Web hosting companies are evil
Vast distances one must travel through rain, sleet, snow, through leech infested lakes and bat filled caves in the hope that one may find the ever so prized discount web hosting plan so perfect, reliable and support friendly that their website and budget will match perfectly.

This is the search many look for over and over every day across the net and yet, so often it seems that no company ever offers the services they promise. I will regale you with my stories of heartbreak with past websites.

My first domain name was viewjokes.com which I purchased when I was 15 and built the site to host huge collections of jokes that I found. I hosted this site with my uncle who had the server at his office and while this had some benefits such as almost unlimited storage space and an almost dedicated server, the site just wasn't very popular and my uncle didn't really know how to admin a webserver that well.

I decided for my next site, thegreatmendoza.com, I wanted to just pay a small fee to have my site hosted so I went with Yahoo! web hosting. I dont remember ever having the website go down ever. I never really needed customer support at the time because everything I was doing was pretty simple but I was paying $11 a month for hosting which provided very little storage space and bandwidth. That was when I was 19 or about two years ago. I then tried to cancel because I was done building the site for thegreatmendoza.com and didn't really want to mess with it anymore but I spent the next three months trying to cancel.

Then I found an add online for a discount web hosting company that would give me a gig of storage and 30 gigs of bandwidth for $4 a month. At the time, that was an awesome price so I signed up with them and my site was up and online within an hour which impressed me. That website was called pauldmendoza.com. Within a month, I had purchased a second domain name with them called ultravisionmedia.com for another website I was developing.

Then the problems started. For a month after buying ultravisionmedia.com, everything seemed fine. Then suddenly there were these outages that would last for hours at a time every couple days. And then my sites went down for almost a day before they came back online. And then on that fateful day about 9 months ago, the sites disappeared. A week later, I received an email from the owners of the company I was hosted with informing me that they were having some financial issues and that they were working to resolve the sites.

A month later, I got another email from them telling me that they had declared bankruptcy and had moved the company to Australia. And to top it all off, I was never able to get my domain names back from that company that I registered them with. Some day they will expire and maybe I'll repurchase them again.

Since that company, I've been ever so careful about who I chose to host my sites. Here are the two companies that I really like.

First is ICDSoft. They are the best discount small hosting site I have ever been with. Literally, support emails are returned in minutes and there is awesome uptime.

Second, Yahoo! hosting. While their support isn't great for time responses, everything else rocks. Their uptime is great, setup takes a matter of minutes before the domain name and everything work, integrates automatically with their email system and works well for php and mysql sites. Not sure if they support Ruby on Rails or any of those other things but I'll have to check on that later.

In conclusion, you get what you pay for with webhosts.
 
Thursday, December 08, 2005
  Glicky
I’m jumping off the plank into the land of obscurity. I’m going to make that plunge into small web startup land with no money. Yup, I’ve decided that I want to be a part of this Web 2.0 bubble at least to ride the wave until our little bubble pops.
Now that some new things are possible on the internet, I’m starting a new company with a friend of mine. I’ve made mention of it before on here but its official name is Gliky. During the last couple of months we’ve been developing the idea for the website but its pretty much a strategy game with a strong social element to it. This is completely self-funded at this point so it gives us a lot of freedom to do whatever we want and take a lot of risks.
Because of the new technologies available such as AJAX, it makes it so that we can really implement the interfaces to the game in a way that we didn’t originally think was possible. It should be a fairly exciting experiment into online game play which I don’t think any other companies have really tried yet that I’ve seen. It’s a little liberating since we can just make it all up as we go along.
I’m building Glicky with my friend Chris who I’m currently in college with. We’ve been looking at creating this game for the last couple of months but we’ve finally started its development and its coming together well so far.
Right now it’s a lot of learning and testing at this point but we’re building a lot of the pages right now with PHP and using SAJAX to do the AJAX implementation. Chris really wanted to use Ruby on Rails but I’m not sure that we should go that direction just yet.
Since I’m hooked on Reddit, I’ve been watching the continual debate between Ruby and not using Ruby and right now I’m just not of the belief that Ruby is the right platform for this site. I honestly haven’t used Ruby so it might be but from what I’ve seen, we’re not going that direction yet.
Right now the plan for Glicky is to develop the site from now until mid-January which should be enough time to build a working prototype and launch an alpha version. Hopefully spend a month in alpha and the decide whether to just launch or go to beta. Based on the complexity of the site, we’re thinking we can get it going in a month’s timeframe but then again, we might be totally insane as well.
Recently we listed out all of the tasks we’d need to complete for the site and its actually a lot more than we originally thought but we’ve set some definable deadlines for ourselves and projected timelines we’d like to have things finished by but as with any programming project I’ve been a part of, deadlines seem to be made only to be broken.
 
Monday, December 05, 2005
  Commenting in code
Tonight I was at server class with Chris waiting for class to start and so I decided to show him before class started how the SAJAX worked inside of the Glicky project we've been working on. Since I've spent the last weekend ripping my hair out at times because of SAJAX, I've got a pretty good understanding of how it works and such so I start showing him the way it works and while it now seems pretty simple to me, I realized quickly its actually pretty complex.

Midway through he's like "And Ruby on Rails wouldn't have been better than this?"

"No" I say but then I started thinking, why wouldn't Ruby on Rails have been as good as this. I realize now the reason is that I'd have to learn a whole other language to do the same thing and what I've got now seems to work just fine. Granted, it does seem to have some hiccups if I miss something.

But then Chris notices something else.

"Paul, you don't have one comment." Chris says to me.

I look at it and I'm like "Yeah, there's one." that's when I realized I'd written a whole list of PHP functions and a whole list of Javascript functions and I'd only put in one comment and that comment was only 8 words. My philosophy lately has been to just write things as fast as I can and figure out whet's wrong later. I guess I forgot to include comments because I know what my code does.

At least for now...

Later Chris goes, "You might not need the comments Paul, but I'm going to need them when I'm going over your code."
 
  Words of Wisdom
I found these words of wisdom today at http://reddit.com/goto?id=16176. Here are a few pieces that I found to be relavent to my latest project.

Make your Accomplishments Seem Effortless


Your actions must seem natural and executed with ease. All the toil and practice that go into them, and also all the clever tricks, must be concealed. When you act, act effortlessly, as if you could do much more. Avoid the temptation of revealing how hard you work – it only raises questions. Teach no one your tricks or they will be used against you.


Play to People’s Fantasies

The truth is often avoided because it is ugly and unpleasant. Never appeal to truth and reality unless you are prepared for the anger that comes for disenchantment. Life is so harsh and distressing that people who can manufacture romance or conjure up fantasy are like oases in the desert: Everyone flocks to them. There is great power in tapping into the fantasies of the masses.

Do not go Past the Mark you Aimed for; In Victory, Learn when to Stop

The moment of victory is often the moment of greatest peril. In the heat of victory, arrogance and overconfidence can push you past the goal you had aimed for, and by going too far, you make more enemies than you defeat. Do not allow success to go to your head. There is no substitute for strategy and careful planning. Set a goal, and when you reach it, stop.
 
Sunday, December 04, 2005
 
Some wise words from Derek Sivers, founder, president, and sole programmer behind CD Baby, an independent music distribution company.

It's so funny when I hear people being so protective of ideas. (People who want me to sign an NDA to tell me the simplest idea.)

To me, ideas are worth nothing unless executed. They are just a multiplier. Execution is worth millions.

Explanation:

AWFUL IDEA = -1
WEAK IDEA = 1
SO-SO IDEA = 5
GOOD IDEA = 10
GREAT IDEA = 15
BRILLIANT IDEA = 20

NO EXECUTION = $1
WEAK EXECUTION = $1000
SO-SO- EXECUTION = $10,000
GOOD EXECUTION = $100,000
GREAT EXECUTION = $1,000,000
BRILLIANT EXECUTION = $10,000,000

To make a business, you need to multiply the two.

The most brilliant idea, with no execution, is worth $20.
The most brilliant idea takes great execution to be worth $20,000,000.

That's why I don't want to hear people's ideas.
I'm not interested until I see their execution.
 
Saturday, December 03, 2005
  AJAX
Okay guys, I just started working with AJAX and SAJAX a couple days ago and so far its going really well. I'm using it with a new web project I'm working on with Chris for the site Glicky.com. We're not saying what it is yet but I can tell you that its not porn. I'm really liking using SAJAX though because its implementation with the PHP support is really nice although I spent a lot of hours today trying to get the page I was building to work correctly but most of those hours were spent figuring out small little syntax things with database connections but now that I've got those figured out, I think we're going to start moving pretty quickly with the site.

If any of you would be interested in Alpha testing it with us when we get to that stage later on, let me know. I know you know nothing yet about it but it should be exciting. :)
 
I am currently an ASP.NET, C# developer working on MangosteenNation.com, a XanGo website for helping people build their businesses. I am also pursuing a degree at CSU San Marcos in Southern California.

XanGo at Mangosteen Nation

Archives
October 2005 / November 2005 / December 2005 / January 2006 / February 2006 / March 2006 / April 2006 / May 2006 / June 2006 / July 2006 / August 2006 / September 2006 / October 2006 / November 2006 / December 2006 / January 2007 / April 2007 / May 2007 / June 2007 / August 2007 / February 2008 / August 2008 /


Powered by Blogger

Subscribe to
Posts [Atom]