jump to navigation

My Post Is Biased And I Am A Horrible Coder April 16, 2011

Posted by ismywebsite in general.
29 comments

Here are the awful design decisions which I made.

1) Broke things down, with logical divisions.
Users are the same as groups of users, and should be treated as such. All the methods to deal with a huge group of users need to go mixed in with the methods to deal with only one.

There’s no logical or important security distinctions between what a client should be able to do and what an administrator should be able to do. We should let client level classes have full reign to do anything.

Finally, there should not be a handy center class. It’s just awful when the whole work of listing, paginating, and allowing commands to be applied to multiple of an item, are already coded and just need to be customized. It just takes so much fun away from building it yourself by hand every time.

2) I automated design pattern coding.
Blind to the fact that one of the simple pleasures in life is coding a very similar thing over and over again, and blind to the absolutely vast quantity of time which we have available to do this, I made the awful design decision to automate a set of base classes.

Not just one, but one for every single type of data we deal with. Users, websites, messages. All of them are automatically generated with a horrible base class that does all the basic stuff. Like if I want to get your username, change your credit balance, etc… I only have the fun of calling a method in this class. Common functions like getters, setters, search, and new object creation should be hand coded.

Not only did I have the base classes automated, but I designed the system so it can be updated if any data structures change, by just running one single script. This deprived developers of the joy of finding all those affected piece of code and manually changing them. As Brendan pointed out, “if it was ‘easy’ then everyone would do it.” Clearly everyone is not doing it, so it’s therefore harder.

3) I made shortcuts for coding.
HTML is such a beautiful language, with it’s long link syntax. I mean it’s just so elegant:

<a href=”mynewpage”>Link Title</a>

Who in their right mind would want the option to type the following instead?

<<mynewpage Link Title>>

It’s only a lot shorter. Again, including a script is also a lot of fun and a very elegant process:

<php include “script-folder/myscript.php”; ?>

What on Earth was I thinking when I created this syntax?

{myscript}

To top it all off, not only did I create all these confusing shortcut options, but I made it so there was an even more confusing way to recompile. You had to pass a confusing and hard to remember one letter handle to the page, like this:

http://www.ismywebsite.net/mypage?r=1

So not only did I deprive from the fun of typing elegant code, but I made this awful torture bottleneck system.

4) I added lots of whitespace.
We all know that computer memory is so incredibly expensive. I mean, I constantly am running out of space because I use an extra space or new line in my files.

We should all look up to the minimal version of JQuery! Now that (deliberately compact) gem is how we should all be coding server-side code, especially in a large project with over 100,000 lines of it. Why bother wasting space formatting anything? It doesn’t take THAT much longer to understand what’s going on, and even if it does, that’s because the reader is stupid.

Honestly, what primitive mind sees text that is closer together as more closely related? I mean, that’s one of those archaic design principals that only apply to cavemen and not to the real geniuses of the world. Why on Earth would it even be better to group things into visual logical steps. And oh the horror, use whitespace to separate those steps…

And an operator is directly part of the numbers on either side! I mean in that case of 1==1, it shouldn’t be 1 == 1, since the 1 is part of the equals. They are completely 100% the same. Because 1equals1. Youknowitstrue. Don’tdenyit. And honestly, thebytesareexpensive. You can all read that just as easily (unless you’re stupid), so spaces here are unnecessary. Imagine the $$$ I just saved the WordPress platform in this paragraph alone.

We all know that every one of you knows how to set the tab length on your editor programs, but for a stupid person like myself, or a lazy person who doesn’t want to do that every single time they switch computers, it isn’t at all any issue when at 5 levels deep, a full quarter of 80 character width is wasted (with 4 spaces). If you come from an even more outdated version with tabs = 8 spaces, then boo on you since half the screen is wasted. But of course, this isn’t fair since we all are exclusively 100% only doing coding. It should be full screen, and there shouldn’t need to be any space for windows beside it, so 80 characters is not a fair width. Besides, even if we do multi-task, larger monitors and desk space are dirt cheap compared to the cost of the extra bytes. So we can all just upgrade.

That’s right, I am even so insane that I prefer two spaces over tabs for line spacing. Please, somebody get me checked in!

Who Fancies Starting From Scratch? April 13, 2011

Posted by ismywebsite in general.
23 comments

Apparently, I wasted most of the last 8 months.

My code has unmentioned problems, undescribed shortfalls, and unexplained ‘issues’. “It just… doesn’t work.” What’s worked for me to enable me to quickly rebuild features at a practical rate of one per day, has mysteriously not had the same effect for any of the other developers.

Speaking of mystery, afraid I would “mess things up”, the entire development team apparently all together, decided to recode the site from scratch. You can see the start of their project here:

(Link removed at developer’s request.)

Hackers will love one of the features of the new system, a handy Crypto() class to let you decrypt any piece of data you like. Give it encrypted passwords, emails, anything you like! The Crypto() will decrypt them all for you while asking no questions at all! What a nice faithful helper.

Edit: Crypto is protected with a couple of additional checks that I was not aware of. So it does ask a couple questions.

In addition, here’s a great new solution for your extra typing pleasure. The setField($v) function has been expanded to modify(“field”, $v). For additional fun, the “field” doesn’t actually match the field name, so you can have hours of entertainment remembering what it is.

But that’s not all! Buy now, and you also get this well chosen quote:

“It’s a short trip from riding the waves of change to being torn apart by the jaws of defeat.”

Talk about riding a wave of change into a sea of defeat… I see a short trip with a long fall.

IsMyWebsite In 20 Seconds – Vote Now April 12, 2011

Posted by ismywebsite in general.
1 comment so far

The poll is here for you to vote on your favourite.

This months contest will be about building banners so webmasters can create a donation link on their website. Their visitors can donate and directly support the hosting of the site. All donations will go to the client’s credit balance. I’ll have more details soon, but you can start to think of ideas now.