PDA

View Full Version : Eternally Confuzzled



Pages : [1] 2

Prelude
07-03-2005, 09:34 PM
I finally got around to making my own web site for posting my tutorials and such. Rather than just put up a good looking site with just BS content, I took my binary search tree tutorials and updated them all over the course of about four days. All in all, I'm pleased with the result. I made everything (especially the code) more consistent across the three articles, added sections that I felt needed to be added for more complete coverage, and discovered (then promptly fixed) a handful of errors. When I find some time to play with Photoshop, I'll replace the lame ASCII art with proper images.

Since I'm slightly biased, what do you guys think about the updates (and the site design if you feel the need to comment)?

www.eternallyconfuzzled.com

Mister C
07-03-2005, 10:02 PM
Prelude,

Well you and I have not always been on best terms.. but your website is great. You have incorperated a lot of good web design techniques.

Two questions:

1. Did you actually have the words "Brain Vomit" trademarked? Why?

2. The lady who sat beside of me on my plane trip from GSP- worked in Atlanta. She really did not have alot of nice things to say about it (Atlanta). She and her husband live in Anderson SC and drive two + hours to jobs in ATL. Do you find alot of people living in SC, TN and AL that commute to ATL for jobs!

Mr. C. :cool:

Prelude
07-03-2005, 10:07 PM
>Well you and I have not always been on best terms
:D

>Did you actually have the words "Brain Vomit" trademarked?
No, and I abused the <acronym> tag to explain why the TM symbol is there.

>Do you find alot of people living in SC, TN and AL that commute to ATL for jobs!
I don't know of any, and quite frankly, that sounds crazy.

^xor
07-03-2005, 10:22 PM
Now that's how a usable website should look like. Although I wouldn't have named the tutorial section "brain vomit". :D

no-one
07-03-2005, 10:46 PM
your site makes me chuckle...

Prelude
07-03-2005, 10:49 PM
>Now that's how a usable website should look like.
Success!

>your site makes me chuckle...
SUCCESS! ;)

>Although I wouldn't have named the tutorial section "brain vomit".
Perhaps that should be the name of the entire site? ;)

^xor
07-03-2005, 11:42 PM
That white thing in the background is kinda annoying by the way. :p

alphaoide
07-04-2005, 01:01 AM
nice!
your email address is exposed to spammer, btw

sean
07-04-2005, 08:07 AM
Very nice, Prelude! (for a girl) :D

No seriously - nice layout - easy to read and navigate. I'm just wondering - is there a story behind the term, "eternally confuzzled"?

edit: Nevermind. I uh, should've actually READ your site, huh? Which brings me to my next point: Good content - it was quite entertaining and well written.

7smurfs
07-04-2005, 08:10 AM
If it works in firefox, it is good enough for me. :)

Really, though, it is a really nice layout, I like it.

elad
07-04-2005, 10:32 AM
Confuzzlement is indeed a pleasant state.

The site looks as good as the content. Thanks.

Stoned_Coder
07-04-2005, 12:34 PM
Very nice Prelude.
Chalk up another for finding that background annoying.
Also I would replace the dark brown on the code with white and syntax colour the code. This could be achieved using sunlights cpp to html converter or im sure you could come up with its equal in 30 mins:)

okinrus
07-04-2005, 01:15 PM
When using IE the binary search II code looks good, but when you run it on firefox or opera, long lines overlap the center line. Everything else looks good, though.

Ken Fitlike
07-04-2005, 04:25 PM
A tad disappointed to find no 'brain food' as a prelude(tm) to 'brain vomit', particularly given the reference to the 'wonderful...gourmet chef'.

I'm hungry now. :(

viaxd
07-05-2005, 05:18 AM
the site looks nice, haven't read the "brain vomit" yet though, but the dark brown code boxes aren't very pleasant, making them lighter would be better imho.

xErath
07-05-2005, 06:07 AM
When using IE the binary search II code looks good, but when you run it on firefox or opera, long lines overlap the center line. Everything else looks good, though.

That's because Opera and FF conform to xhtml/css standards. (increase the window size)


Hey Prelude. Nice website :cool:
A small fix: the css and xhtml validator links are switched :p

Sang-drax
07-05-2005, 06:40 AM
I don't like fixed backgrounds.

treenef
07-05-2005, 06:47 AM
You could just add a 3D prelude... ok I have too much time.
:confused:

Govtcheez
07-05-2005, 06:50 AM
You could just add a 3D prelude... ok I have too much time.
:confused:
GAH! WHAT THE HELL IS THAT THING?

pianorain
07-05-2005, 07:00 AM
You could just add a 3D prelude... ok I have too much time.
:confused:I think you've mistaken the mouth as a nose. Take a closer look.

kermit
07-05-2005, 08:43 AM
You could just add a 3D prelude... ok I have too much time.
:confused:

That is a pretty funny picture.

I think this is what it is supposed to look like though:

edit:: If I am wrong, I blame my wife.

edit 2 :: She said I could say that...

ober
07-05-2005, 09:45 AM
Not bad, not bad at all. And very clean coding I might add. :)

Dante Shamest
07-05-2005, 02:03 PM
Nice simple website. :)

And I see we have the same tastes in web comics.

I see you didn't put my favourite, nuklear power (http://www.nuklearpower.com/) though. :(

And although the art at MegaTokyo has improved, the story has gone down alot.

okinrus
07-05-2005, 04:00 PM
That's because Opera and FF conform to xhtml/css standards. (increase the window size)

Well, I think at least with HTML the browser can choose to display any way they want to. I don't know about the xhtml/css standards.

I also don't think increasing the window size is the best option. I tried both 800x600 and 1024x760 with the screen maximisedthe problem is still there. (With 1024x760 and the problem is almost gone but still there.) I think a temporary fix would be to shorten a few lines, maybe using "typedef struct jsw_tree jsw_tree".

ober
07-05-2005, 06:06 PM
>>I also don't think increasing the window size is the best option. I tried both 800x600 and 1024x760 with the screen maximisedthe problem is still there. (With 1024x760 and the problem is almost gone but still there.) I think a temporary fix would be to shorten a few lines, maybe using "typedef struct jsw_tree jsw_tree".

*bang*

>> I don't know about the xhtml/css standards.

Then shut yer mouth.

Prelude
07-05-2005, 06:30 PM
>but the dark brown code boxes aren't very pleasant
That's a consistent complaint, so I'll look for a better color. Fortunately, I planned ahead and all I need to change is my stylesheet. :D

>the css and xhtml validator links are switched
:eek: I wonder how that happened.

>I don't like fixed backgrounds.
I'm divided. I like the extra bit of style that they add, but sometimes scrolling is jerky. However, with the looooong pages, I set the background as fixed to keep it from being too dull.

>You could just add a 3D prelude...
Not nearly cute enough. ;)

>And very clean coding I might add.
I'm anal about things like that.

>And although the art at MegaTokyo has improved, the story has gone down alot.
Actually, I think that the story has only gotten better as Fred-rin has gotten more experienced. Sure, it's more of a drama now than a humor comic, but that's a good thing IMO.

>I tried both 800x600 and 1024x760 with the screen maximisedthe problem is still there.
This is a tricky area. Resolution isn't the only thing you have to think about when building a web page. For example, different text sizes will render differently and could throw off the entire layout. When I get around to it, I'll determine which boxes are likely to have a problem and set the overflow to scroll. I prepared for that and have a scroll class ready, but the scroll bars are kinda fugly.

>I think a temporary fix would be to shorten a few lines, maybe using "typedef struct jsw_tree jsw_tree".
:eek: :eek: :eek: All stylistic reasons for avoiding that aside, I loathe changing my style just to meet formatting needs. I'd rather add a scroll to the box than change my code. ;)

okinrus
07-05-2005, 07:19 PM
Then shut yer mouth.

ober, why? do you agree with me that the standards should matter in this case? Every xml standard I've read defines a way of structuring data not presenting data, and every browser is going to choose a different way to present the data, right?



This is a tricky area. Resolution isn't the only thing you have to think about when building a web page. For example, different text sizes will render differently and could throw off the entire layout. When I get around to it, I'll determine which boxes are likely to have a problem and set the overflow to scroll. I prepared for that and have a scroll class ready, but the scroll bars are kinda fugly.

Prelude, maybe the overlap was the text setting as well the resolution. It looks good when viewed through IE and IE doesn't use scroll bars, so maybe you could get firefox and opera to do what IE does? In any case, if you do use scroll bars make sure the vertical text is large. I've tried to read code that only has three or four lines vertically and it's almost impossible.



All stylistic reasons for avoiding that aside, I loathe changing my style just to meet formatting needs. I'd rather add a scroll to the box than change my code.

Some people have made cases that using "struct s" instead of "typedef struct s" isn't just style, but nowdays I think it doesn't matter.

xErath
07-05-2005, 08:01 PM
ober, why? do you agree with me that the standards should matter in this case? Every xml standard I've read defines a way of structuring data not presenting data, and every browser is going to choose a different way to present the data, right?
No. xhtml/css standard is clear. Markup and presentation. Content and looks. css exists for some reason.
When internet became popular by 93~94, there was a browser war about adding new html tags - anarky. Netscape introduces the font tag with size and color, later internet explorer introduced the font face attribute, and it was caos. Browser wars, each one adding as much tags a possible, just to said tha browser X is good, browser Y doesn't support this and that. In 1999 w3C created the standard with defined every little piece of influence each tag would make in a final document. Currently all major browsers stick to this standard to keep html documents portable. All, except for one: IE which still lives in the stone age, with known security holes for more that 2 years, but Ms doesn't care a bit about it. IE comes with windows. most windows users are unexperienced so they use IE. IE respects old standard, and IE specific syntax for javascript, html. Since IE owns 88% of browser market share, MS doesn't care a bit about updating that piece of crap software, which I call a virus myself. Therefore 90% of webpages are made of broken stupid code, written by WYSIWYG stupid editors, or with IE specific coding. Then people rant about Opera's or FF lack for rendering all webpages well. The problem is not with the browser but yes with the page.
Do a favour to yourselves and the www: don't use IE.
My recomendation: opera (http://www.opera.com/download/)

MS has already anounced IE 7, obviously only to fight against the increasing market share of alternative browsers. It'll have tabbed browsing, rss feed, and probably a bit more of support for standard xhtml/css. If so, many webportals will render bad in IE7 and prove those webmasters should be cleaning toilets in a bus stop.

Mister C
07-05-2005, 08:52 PM
When I find some time to play with Photoshop, I'll replace the lame ASCII art with proper images.

Tony G. used Adobe Illustrator for our book and his other books.

Also, do you have plans to add more on the following tree topics:

1. B Trees
2. B+ Trees

3. Tries (Lexical Search Trees)

JC :cool:

prog-bman
07-05-2005, 09:51 PM
Everything is good except for the code background and one major problem you used C and not C++ ;)

major_small
07-05-2005, 10:03 PM
I prefer the fixed background (even though, like you said, it leads to a jerky scroll), but that background image is a bit harsh... it's a little too bright and distracts from the words on top of it... and it's especially annoying since it's always right in the middle of what you're reading :P

and you really do need to do something about those code boxes... make them just a few shades darker or lighter than the background color and you should be fine... something like the boxes on these here forums:
5
3 7
2 4 6 8

okinrus
07-05-2005, 10:49 PM
No. xhtml/css standard is clear. Markup and presentation.

Can you clarify what this means? Like if I use the <em> tag, it's supposed to add emphasis, but each browser defines this differently. For example, lynx might define emphasis as bold text, whereas IE might define emphasis as italics. Is the emphasis part of the presentation? I think so, but it's not about how something is presented, but how the user reacts



Content and looks. css exists for some reason.
When internet became popular by 93~94, there was a browser war about adding new html tags - anarky. Netscape introduces the font tag with size and color, later internet explorer introduced the font face attribute, and it was caos.

OK, but no browser can determine what a font will look like exactly on the screen. For instance, my linux system might not have a true type font server or enabled X server, and my fonts will look jaggy. Another system need not even have the the right font. This is all notwithstanding each system interpreting the font tag the same way. Other visual things could be detailed.

major_small
07-05-2005, 11:27 PM
I found something: first binary search tree page, paragraph about the save double pointer: you have *save (the 'e' isn't bolded)

xErath
07-05-2005, 11:46 PM
Can you clarify what this means? Like if I use the <em> tag, it's supposed to add emphasis, but each browser defines this differently. For example, lynx might define emphasis as bold text, whereas IE might define emphasis as italics. Is the emphasis part of the presentation? I think so, but it's not about how something is presented, but how the user reacts


OK, but no browser can determine what a font will look like exactly on the screen. For instance, my linux system might not have a true type font server or enabled X server, and my fonts will look jaggy. Another system need not even have the the right font. This is all notwithstanding each system interpreting the font tag the same way. Other visual things could be detailed.

Each browser has it's own default css. If you use em it's up to you to provide the proper formating rules. If not, the browser uses its default. About the fonts, it's the same. The webpage provides info on the font to be used. If there's no font available on the system a default one is used. Good webpages manage all these little issues, and are always well displayed.
Plus, if you want to continue this discussion, please inform yourself a bit.
www.w3.org
www.w3schools.org
http://www.mcsr.olemiss.edu/~mudws/font.html
http://en.wikipedia.org/wiki/Criticisms_of_Internet_Explorer

The problem with IE is something like: you say you want the text to be bold and italic. Any browser will render that text that way. IE instead will only render the bold atribute, and add maybe a unwanted underline. This is a small unpractical example. IE doesn't conform to the rules. So you'll end up with garbage. Unfortunatly IE is the most used browser, so most webpages conform to IE and not the standards.
The same applies for C/C++. If you write good clean and portable code, you can be sure it'll almost work on any platform. If you try stunts like fflush(stdin); you'll get a unwanted operation, but any MS compiler will flush stdin (http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vclib/html/_crt_fflush.asp), because it doesn't conform to the standards.

Glirk Dient
07-06-2005, 01:06 AM
I have pretty much ignored most of this thread, so don't flame if this has been said already.

First off, I would suggest making the side bar on the right a bit smaller, as it rather large and seems to take up some room for the content.

Also, add links to the site you are currently at..as in make the menu system static so the options don't change around or dissapear when you go to a different page.

Other than that, looks good!

ober
07-06-2005, 09:29 AM
xErath, thanks for saying exactly what I should have said. I couldn't have said it any better myself.

okinrus, you need to do some reading and some web development to understand what we're talking about here. IE is the bane of any true web developer and if you start developing yourself, you'll find that you develop with Opera or FF (Opera is my choice), and then you make corrections for IE.... not the other way around. IE is a piece of tolerant garbage IMO, and unfortunately, I think they're at a point where they won't ever be able to fix the mess they've got themselves into. Fixing the browser to support the current standard would mean that they'd break probably 60% of the websites on the net. I'd love to see that day, but unfortunately for us, I don't think MS would do that because everyone would stop using their stuff.

Sad but true.

alphaoide
07-06-2005, 10:02 AM
IE is a piece of tolerant garbage IMO, and unfortunately, I think they're at a point where they won't ever be able to fix the mess they've got themselves into. Fixing the browser to support the current standard would mean that they'd break probably 60% of the websites on the net. I'd love to see that day, but unfortunately for us, I don't think MS would do that because everyone would stop using their stuff.

Sad but true.
WaSP to Collaborate with Microsoft to Promote Web Standards
http://webstandards.org/press/releases/archive/2005/07/05/index.html

xErath
07-06-2005, 11:54 AM
WaSP to Collaborate with Microsoft to Promote Web Standards
http://webstandards.org/press/releases/archive/2005/07/05/index.html
beautifull!!!.... :eek: :)


Today Visual Studio 2005 and ASP.NET 2.0, currently in beta, create XHTML 1.0 transitional markup by default and provide real-time standards and browser markup validation.

major_small
07-06-2005, 02:16 PM
Fixing the browser to support the current standard would mean that they'd break probably 60% of the websites on the net. I'd love to see that day, but unfortunately for us, I don't think MS would do that because everyone would stop using their stuff.

Sad but true.I would hope opera/ff users are pressuring web developers enough... whenever I get to a page that says "you must have internet explorer x or better" I don't even give it a chance, unless it's something I really need, in which case I fire a quasi-nasty email to the web developer (I usually don't reboot into windows just to see the page) http://www.w3schools.com/browsers/browsers_stats.asp

okinrus
07-06-2005, 03:36 PM
okinrus, you need to do some reading and some web development to understand what we're talking about here. IE is the bane of any true web developer and if you start developing yourself, you'll find that you develop with Opera or FF (Opera is my choice), and then you make corrections for IE.... not the other way around. IE is a piece of tolerant garbage IMO, and unfortunately, I think they're at a point where they won't ever be able to fix the mess they've got themselves into. Fixing the browser to support the current standard would mean that they'd break probably 60% of the websites on the net. I'd love to see that day, but unfortunately for us, I don't think MS would do that because everyone would stop using their stuff.

ober, I don't do professional web-developing, but have done a little bit of raw html and I've been meaning to get a book on css. As for IE, yes, I've heard it said often that IE lets illegal html go, but it's really Microsoft's choice, I think. They've probably analysed this issue, found the majority of users not web developers like the browser to guess the best layout, and then built the software. Or they built the software and then found fixing it to be too costly. Of course this situation puts the web developers at a disadvantage---kind of like a compiler that guesses variable names. But Microsoft probably thinks a good developer would test a page using the three main browsers and maybe a few rare ones such as Konquer.



The same applies for C/C++. If you write good clean and portable code, you can be sure it'll almost work on any platform. If you try stunts like fflush(stdin); you'll get a unwanted operation, but any MS compiler will flush stdin, because it doesn't conform to the standards.

xrath, fflush stdin is undefined by the C/C++ stdandards; any compiler is free to define this behavior and remain standard. But personally, I think the best behavior would be for the compiler to mark it as an error or warning. I don't think microsoft or gcc does this.

Prelude
07-06-2005, 04:32 PM
>Also, do you have plans to add more on the following tree topics
Probably, but they aren't on my list at the moment.

>Everything is good except for the code background
Fixed.

>and one major problem you used C and not C++
For good reason. If I used C++ then everyone would expect me to use a proper C++ framework, which would complicate the examples drastically. With C, nothing gets in the way of the underlying logic while still maintaining good code.

>it's especially annoying since it's always right in the middle of what you're reading
Not anymore. :)

>I found something
Fixed.

>add links to the site you are currently at
I went out of my way to avoid doing that because it's considered a common mistake of web design.

xErath
07-06-2005, 07:27 PM
Or they built the software and then found fixing it to be too costly. Of course this situation puts the web developers at a disadvantage
This is what I been saying


But Microsoft probably thinks a good developer would test a page using the three main browsers and maybe a few rare ones such as Konquer. Microsoft what ?!? You're joking right ?!?
This is a piece of code from browser.js from Opera


// Fixing MSDN
// Problem: very IE-centric scripting, excludes other browsers with sniffing
// Credits: Tarquin
if( location.href.indexOf('http:\/\/msdn.microsoft.com\/workshop\/') == 0 ) {
//more 70 lines of code




xrath, fflush stdin is undefined by the C/C++ stdandards; any compiler is free to define this behavior and remain standard. But personally, I think the best behavior would be for the compiler to mark it as an error or warning. I don't think microsoft or gcc does this.
please read the link
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vclib/html/_crt_fflush.asp
MS supports fflush(stdin); Any standard code works on MSVC++. Code for VC++ only may not work on a standard compliant compiler.

I don't want to continue this discussion here. This topic is dedicated to Prelude's website.

Stoned_Coder
07-06-2005, 08:36 PM
I still think that code could benefit from syntax colourring. You could use this (http://www.sunlightd.com/Projects/CPPtoHTML/) or maybe this. (http://www.bedaux.net/cpp2html/)

Prelude
07-07-2005, 04:22 PM
>I still think that code could benefit from syntax colourring.
That's my next change. I got about twenty lines into my own implementation of C++ to HTML, then changed my mind and modified Sunlight's code to suit my needs. ;)

Good programmers write good code. Great programmers steal good code.

The Brain
07-07-2005, 04:29 PM
"stealing" seems like such a harsh word.. i prefer to think of it as, "code re-use"

Ken Fitlike
07-07-2005, 04:31 PM
Third paragraph of main page reads: "..I do this not because I want give them as much variety as possible.."; might read better as "...I do this not because I want to give them as much variety as possible"

It's getting very difficult to spot your typos, you know.

Prelude
07-07-2005, 04:53 PM
>"stealing" seems like such a harsh word..
I'm not afraid to tell it like it is. :)

>It's getting very difficult to spot your typos, you know.
My BS is getting better then.

major_small
07-07-2005, 06:53 PM
>I still think that code could benefit from syntax colourring.
That's my next change. I got about twenty lines into my own implementation of C++ to HTML, then changed my mind and modified Sunlight's code to suit my needs. ;)

Good programmers write good code. Great programmers steal good code.
do you happen to have a list of colors/words used? I've been looking to code one in Perl/PHP to output in HTML and Vb so it can be used for these forums...

I used to use the program from the CodeGuru forums, but that was built for windows, and I've been using linux for the past few months... and I'm too lazy to write it all out and choose colors...

unless, of course, you already know of one :P

edit: hmm... I'm finding out that PHP's built-in syntax highlighting works for C++ as well...

Prelude
07-07-2005, 08:19 PM
>do you happen to have a list of colors/words used?
The colors are grabbed from my global stylesheet. This is the keyword list though:

#define
#elif
#else
#endif
#if
#ifdef
#ifndef
#include
#pragma
auto
bad_cast
bad_typeid
bool
break
case
catch
char
class
const
const_cast
continue
default
delete
do
double
dynamic_cast
else
enum
explicit
extern
false
float
for
friend
goto
if
inline
int
long
mutable
namespace
new
nothrow
operator
private
protected
public
register
reinterpret_cast
return
short
signed
sizeof
static
static_cast
struct
switch
template
this
throw
true
try
type_info
typedef
typeid
typename
union
unsigned
using
virtual
void
volatile
wchar_t
while

There are a few minor issues with Sunlight's code that need to be rectified for compilation on a modern C++ compiler (he clearly used VC++ 6). The Windows specific parts can be easily removed as well and the code should compile on Linux.

The Brain
07-07-2005, 08:45 PM
Here is a list of keywords I have never used in my c++ career:

#elif
auto
bad_cast
bad_typeid
const_cast
dynamic_cast
explicit
extern
goto
inline
mutable
nothrow
register
reinterpret_cast
type_info
typeid
union
volatile
wchar_t


i'm sure many of ye' can beat this




also: I would like to add bad_alloc to the list of c++ keywords