Mar
16
2009
2

Programming site

So it’s been 6 months since I first started programming. I now know c, c++, java, mysql, php, ruby on rails, xml, a little python and some server side management crap. I can learn a new programming language in less than three days and I feel like I can make a small web company in like a week. Yet I still see so many people missing programmers. People who need programming interns and such. Is the barrier to entry really that high? Or do people just want the easy way out by delegating some poor intern for every bug fix. That must be the shittiest job ever by the way. It is so much harder to look at someone else’s code and try to fix it than to create one yourself. Those interns should be paid more than lead developers in my opinion.

I think someone should build a step by step programming site. This’ll be one of my future side projects if no one explores it. Coming up spring break hopefully. Along with Jess’s and my new project. Life’s a lot more exciting once I got into college.

Written by Andy in: Business | Tags: ,
Nov
11
2008
2

How to setup a free web development environment (mac)

It may seem like a lot, and when something doesn’t work, you feel violently pissed off. But, it feels SO good when it works.

1: Get apache to work.

Update your version of mac os and go into system preferences. That’s the thing with the gears - very important to your mac. Click Sharing under internet & Network. Now in that list of crap on the side, check Web Sharing. Do whatever seems right and when you’re done, go to your web browser and type in whatever they tell you to. And, yes, if your friend, who is using the same router as you, types http://192.168.something into their browser they will get your site. Pretty awesome huh. Wanna change it?

2: Changing your website, OMG html

Use your finder to open your folder (the one with your name on it) and then the folder called Sites. See that thing called index.html? That’s what’s you’re seeing when you go visit the web address. First rename it to index2.html or something. Now to edit it, you can do it in texteditor but please act like a pro and download a program specifically designed for it like Aquamacs. Now, simply open the file with aquamacs (right click and go under open with > *kangaroo deer thing* ). A lot of code to read and learn from if you want. Open a new file with aquamacs. Copy this:

<html>
<body>
<h1>WOOT!!!</h1>
</body>
</html>

Save as index.html in the folder Sites. Goto your site now. The one that has ~yourname in it. WOOT!!! Play around with it. Call yourself god. Whatever.

Just know that it’s not real programming until you get Php.

3: Php

I mentioned somewhere that I liked Php. You should too.

There’s a few ways to enable Php. Notice I said enable, not install (go macs). Here’s the cool kid’s way:

Open up Terminal. It’s under Applications>Utilities. Time to learn a bit of unix. Even if you don’t know what the hell’s going on, it’s really cool. By the way, the thing you’re in right now is called the Shell. Go to the folder you need to modify by typing in:

cd /private/etc/apache2/

First, you need to change php.ini.default into php.ini with this command:

sudo cp php.ini.default php.ini

Next, you need to modify httpd.conf so type:

sudo vi httpd.conf

Type in your computer login password (blank if there is none). Now type:

/php

This searches the text for the words php and you should get something like

#LoadModule php5_module        libexec/apache2/libphp5.so

Type (not copy):

aandy rules

Pressing a lets you edit the file. Now delete andy rules since it is not relevant. What you do need to do however, is delete the # (the numsign) in front of LoadModule…

Now Type:

esc

:wq!

Finally, in your shell, what you should be in right now, type

sudo apachectl graceful

That restarts apache so you have your php install online. It’s apachectl with a l for long by the way.

Now, go to Sites (don’t tell me you forgot how) again and rename index.html to index3.html. Open a new file in aquamacs and copy in:

<html>
<body>
<a href=”http://www.Internshipin.com”>Internshipin.com</a>
</body>
</html>

<?php echo “Rules!!!”;?>

<? phpinfo();?>

Almost done ><. Save in Sites as index.php and check your site again!

4: Mysql

This one’s pretty easy. Go here and download the mysql that matches your mac OS version. Click on the mac icon on the top left to find your OS version. Download and open the readme. Follow directions and install everything.

5: PhpMyAdmin

This thing’s really cool. Go here, download and extract it. Rename the entire folder into something simple like pma or phpmyadmin. Just get rid of the version number and stuff. Now, apparently, this phpmyadmin is not complete. Really stupid, I know. Open up a new file in aquamacs and name it config.inc.php. Save it in pma or whatever you renamed your phpmyadmin folder to be. It should contain:

<?php $cfg['blowfish_secret'] = ‘ae85mh04wq23′; // Enter a random string to be used for blowfish encryption
// Server(s) configuration
$i = 0;
$i++;
$cfg['Servers'][$i]['host'] = ‘127.0.0.1′; // ‘localhost’ did NOT work!
$cfg['Servers'][$i]['connect_type'] = ’socket’; // ‘tcp’ did NOT work!
$cfg['Servers'][$i]['auth_type'] = ‘cookie’; // Using cookies is easiest and safest setup.
$cfg['Servers'][$i]['user'] = ”; // MySQL user - empty for cookies
$cfg['Servers'][$i]['password'] = ”; // MySQL password - empty for cookies?>

Move your folder to Macintosh>library>webserver>documents.

Reload apache again and now, when you goto http://localhost/pma, you should be able to see your phpmyadmin! Login as root with no password and make a user for yourself by going under priviledges.

My laundry’s done.

Written by Andy in: Knowledge, tutorial | Tags: , ,
Nov
09
2008
1

How to program

I had a really hard time figuring this out. I still probably don’t have it down completely.

First, what is programming?

People talk about programming as languages and they are literally correct. Learning programming is just like learning a language. You don’t know how to say something? Fine, write it down in English or whatever language you know and search for ways to express what you want to do. If your still screwing up, then you just have crappy grammar. It’s not like the SATs or anything, just fix your mistakes and you’ll get a 2400.

What requirements are there?

You don’t need to be a genius or anything. Always remember to look things up when you need it and life will go on. NEVER try code stuff without searching for a better solution first. Chances are, the function you’re looking for is already defined. If you think the function should be defined then it is defined.

How to start:

Most people and schools start with Java or C++ or Scheme. Sure, people can plow through manuals and learn Java or C++, in a couple of months. The thing with these languages is that they are very powerful but more useful for hardcore programmers. I believe that it would be better to learn a web development language such as Php first. It is simple, it can get you a job in lots of places, and you can use it to actually make something useful - namely a website.

Written by Andy in: Knowledge, tutorial | Tags: , ,

Powered by WordPress | Aeros Theme | TheBuckmaker.com WordPress Themes