PDA

View Full Version : Programming Thread


Vampyr
03-19-2005, 09:54 PM
There seemed to be a mild amount of interest, so I decided to start a programming thread. Here we can discuss programming, give tips, and help each other with our programming problems.

Namely me.

I'll start off:

Lets say I'm designing a website, and lets say that this is my temporary layout that I threw together in an hour just so I could have something to program:

Once you open it, be sure to click it to enlarge it. And those empty purple boxes are for content, like featured art or writings.
http://www.thefilebin.com/userfiles/vampyr/layout.jpg

Now that I have the pictures made, what is the next step in developing the website? Do I need to do something in image ready? I can't seem to figure this out.

And just so you know, I have some hosting, dreamweaver, photoshop, and an FTP client, so I'm good to go, if only I knew what I were doing.

Dyne
03-20-2005, 02:21 AM
Aw, the link's broken.

I think your next step would be to open up Dreamweaver. When I make websites, though, I usually work through WordPad, so my way would be the hard way.

And speaking of programming, what languages does everyone have under their belt? I'm currently with:

Java/Regular Expression
Python
C/C++
VisualBasic
Assembly
PHP
MySQL
HTML/XHTML/DHTML/CSS/Javascript/XML
Flash MX Script

I learned HTML when I was in grade 4, but I didn't particularily like it. My father was a business major with a minor in Computer Science (back in the 70's), and believe it or not, my Grandfather actually got a Computer Science major in the 50's/60's. He was a computer specialist under BC Hydro. So, I have a bit of a legacy to hold here.

Typhoid
03-20-2005, 02:27 AM
Java/Regular Expression
Python
C/C++
VisualBasic
Assembly
PHP
MySQL
HTML/XHTML/DHTML/CSS/Javascript/XML
Flash MX Script

I learned HTML when I was in grade 4, but I didn't particularily like it. My father was a business major with a minor in Computer Science (back in the 70's), and believe it or not, my Grandfather actually got a Computer Science major in the 50's/60's. He was a computer specialist under BC Hydro. So, I have a bit of a legacy to hold here.


My dad used to be like, the head Computer Guy ( I forget his actual Job) at BC Hydro, but he got bought out by an American Company. Damn Capitalism.


Anyways, I only have : HTML, Java, and C++.





Err, thats all I can think of off of the top of my head anyways.

dropCGCF
03-20-2005, 03:16 AM
I once wrote the code for a linear RPG on a Ti-83. That's the depth of my experience. I also touch on a little HTML.

</hate>.

Blackmane
03-20-2005, 04:16 AM
I know C as a programming language, and I've taught myself a little C++.

I also know HTML, though it isn't technically the same as a programming language :D

Vampyr
03-20-2005, 10:42 AM
Ok, I've figured some things out. And dyne, that link is working for me. ?_?

Before taking it to dreamweaver, I sliced everything. All the links and images and everything, then I saved it as a .html. Then I can just upload the html file to by web hosting. Today I'm going to start working on doing special effects in imageready, like roll overs. After I get this website up and functioning, I'll begin work on a real, cooler design.

Also, big question: Can I make dreamweaver code my website in a language other than .html? I would like to use php or cold fusion or something other than .html, just so I could learn something new.

Also, what do you use C++ for? And what kind of program do you use to create it?

Jason1
03-20-2005, 12:01 PM
Im taking a programming class this year at school...we've allready done a bunch of stuff in C++, and now we're just starting to get pretty deep into Visual Basic.

So C++ and Visual Basic for me.

Dyne
03-20-2005, 08:37 PM
To compile C++, you need a compiler like Borland. A lot of people use Borland, but.. I highly recommend Bloodshed's Dev C++ program. I think that's the best program I've come across when it comes to C++.

http://bloodshed.net/

I don't know how Dreamweaver works, but I think you can download another Dreamweaver-like program for ColdFusion.

Vampyr
03-20-2005, 09:01 PM
Ok, I very very nearly have this figured out, just a few questions, and I'm there.

How do I edit my pages once I have them up? I do not want to have to reupload the home page to my server every single time I update it.

Like lets say I have a square where I am going to record journal entries. How would I directly alter that area (with new entries), without reuploading the page? Or if I have spaces that I would like to change the image every now and then?

Also, I want my text areas to be expandable.

gekko
03-20-2005, 09:25 PM
Well, what's your overall plan? To make a website, or to actually get into web development?

Dreamweaver is a good way to start, but that's it. Generally they end up making a mess or tables that due to browsers compensating for horrible code, they somehow show up. They don't follow any of the standards.

If you really want to get into design, work more with CSS. If you want to know server-side stuff, learn PHP. For databases, I recommend mySQL for starters.

ASP and ColdFusion may be able to land you a job, but they are not worth learning except to put on your resume. I'd also avoid learning CGI, Perl, and Javascript for the same reasons. While they can be used, there's generally better, more compatible ways to get the job done.

While you're learning HTML, save yourself some trouble and program the entire thing in XHTML. It's cleaner, and stricter. You will actually learn what's allowed, and what's not allowed. People will throw anything inside a table tag, and just because a browser reads it, doesn't mean it's correct. Other browsers, that don't compensate for stupidity, will end up displaying your page differently.

Also, the less tables you have, the better. If you get good and want to do something a little more difficult, but a lot better, use CSS positioning instead of tables. Believe it or not, you can do an entire website without a single table. Tables were designed to store data, not to be used in layouts.

Now for what you were saying, how to update a journal entry without reuploading the page, yoy make sure that the journal entry isn't part of the file. Either include a test file into that place (which can be done many ways, with many languages), or you have to use a database, and recall the information from a database. But that takes a little more work, depending on how far you want to go.

Anyway, I know HTML, XHTML, CSS, PHP, SQL and a little XML and Javascript. I'm trying to learn C/C++/C# when I have free time. Web development is just a hobby of mine, I plan of making computer programming a career.

Dyne
03-20-2005, 09:26 PM
Ah, that's where you get outside the realm of HTML. Here's a nice program to use for news posts;

http://coranto.gweilo.org/

Basically, you'll need a database structure, and a language accessing that structure. For example, this forum runs through MySQL, a structured query language, and PHP, the calling language. I think ColdFusion mimics this, too.

EDIT: Good to see you in this thread, Gekko.

gekko
03-20-2005, 09:40 PM
"Good to see you in this thread, Gekko."

Yes. I can't be much help while I'm still stuck overhere, because all my resources, bookmarks, and everything else are back home. But in a month, I'll have them all back, if of course, people are still interested..

Worst thing about being in the Marines is you start forgetting things, fast. In the last 2 years I've forgotten so much stuff, it's unbelievable. Programming languages definetly tops the list.

Oh well, it was my choice to join the Marines. Just wish I had the choice to get out.

Vampyr
03-20-2005, 09:55 PM
Thanks...and a lot of that came off as gibberish. heh

Right now I'm just interested in making a website. It is a personal website where I will feature my art and writing, and some other odds and ends. I do hope to eventually get into web development, though, but code completely blows my mind at the moment.

I'm trying to find some stuff that teaches me things as though I were a two year old.

But what do you mean by "test file"? Does that mean I will just have to upload that single file every time I update? And I'm still not sure that would work, because I want to be able to continuosly save old entires, and have people comment on them.

And that program looks nice, dyne, and if I want to use something like it I will need to download mysql and php and install them in my webspace, won't I?

gekko
03-20-2005, 10:16 PM
I meant to say text file, but I typed it wrong. But yes, you would have to update that file each time. To avoid uploading anything, the best thing to do is use a database.

To explain includes, it physically includes a file when the page is grabbed by the server. So if you have a file that contains all the code for your navigation bar, you include it. When the server grabs the file, it puts the content into that space, so you can't tell the difference when the page is displayed. But then if you want to add a link, just change it on that one file, and it will be changed for your whole site. It's always good to design your site in sections, with each as an include. Easier to change that way.

As for the database, you can do a simple one, with just a little PHP knowledge and a GUI to help you setup the SQL tables (forgot what the popular one is called). It's basically doing this...

Main page

connect to database
retrieve most recent entry
display headline
display date, etc.
display journal

Archive page

connect to database
retrieve all journal entries
display date, headline

Now just create a simple login form, and a couple text fields to save it into the database.

Not too complicated if you get something to base your code off of. I think Site5 has a tutorial on a content management system, or database driven site that would help you out.

But what your doing is pretty basic, but will get you involved with a few different aspects of PHP, so it would be good if you tried to do it on your own. Once you do that, you can add the comments. Not too hard, just the same thing, slightly modified so they can type in name, email, and the comment or whatever.

Or... take the easy way out, and just get a blog script. But that's no fun.

As for the last question, depends where you're hosting your site.

Vampyr
03-20-2005, 10:22 PM
I thought about finding a script, but I really don't want to do that, so I'm going to learn it myself.

I'm going to look around for some tutorials like you mentioned, and thanks A LOT for the help. +rep

I think I'm going to pick up a copy of "programing for dummies" or something next time I'm out.

And that's an interesting thing you mentioned about doing the site in sections. I hadn't thought about that. If I were to upload everything as a whole page, I would be constantly changing tons of stuff.

*strokes chin*

Thanks.

MuGen
03-21-2005, 01:44 AM
I have HTML/DHTML/Java/CSS/PHP/CGI/ASP/ColdFusion/SQL/ActionScript(Flash) under my belt... eh. I'm a bit late on this thread.

Vampyr
03-21-2005, 05:34 PM
Can someone give me a definition of what exactly a "database" is?

Like is it located on my server space or on my computer, and what is it used for? I just don't understand *what* it is exactly.

ulala06
03-21-2005, 08:42 PM
hey guys, i've been out of the web-design loop for about 2 years now, and i was wondering what the best free website provider is right now(just for practicing, etc.)

Vampyr
03-21-2005, 08:56 PM
http://www.angelfire.com
http://www.tripod.com
http://www.geocities.com
http://www.freewebs.com

ulala06
03-22-2005, 09:40 AM
http://www.angelfire.com
http://www.tripod.com
http://www.geocities.com
http://www.freewebs.com


ok... geocities is the best of those, no doubt.

wow, nothing's changed in two years... that's very sad.

ZebraRampage
03-22-2005, 06:46 PM
My school is just starting to get C++, but I won't be able to take it. I only know Visual Basic really.

Vampyr
03-22-2005, 06:47 PM
ok... geocities is the best of those, no doubt.

wow, nothing's changed in two years... that's very sad.

They are all pretty nice. I wouldn't say any is better than the other.

Update!: http://home.comcast.net/~zalu_ragar/home.html

My website is really coming along! I'll probably change this layout after I learn how to program, because I made this really fast, but I like it for what it really is. I'm going to work on the html and make the links, and I have a PHP script that Kyuzo gave me that will let me put a journal/news section in the center.

I am taking Gekko and Kyuzo's advice and making the nav bars the same on every single page so that they are extremely easy to change.

Those three purple boxe's you see will contain featured content, like articles or new artwork.

gekko
04-02-2005, 02:22 AM
Can someone give me a definition of what exactly a "database" is?

Like is it located on my server space or on my computer, and what is it used for? I just don't understand *what* it is exactly.

A collection of data arranged for ease and speed of search and retrieval.

A database is a metheod of storing information, that can be accessed externally. Generally, everything is stored in tables, but if you get more advanced you'll find you can store images and all that crap in them to, for better or worse.

Anyway, take this forum as an example. The database will store the information in multiple columns, ie.

Thread ID = 1234
Post ID = 164917
User ID = 15
Post title = Programming Thread
Post icon = 5
post contents = Blah blah blah

Anyway, the information can all be searched and easily recalled.

So when this is posted, it puts the reply under thread 1234, it knows user 15 posted it, so it'll grab his information for the side bar, then it puts the title that you entered into the proper spot, as well as any icon you chose, and the contents of the post.

If you wanted to do this another way, you would have write a script that physically created and deleted text files to store the same information, which is a lot slower and (IMO) more complicated.

Yada, yada, yada...