How to proove that PB doesnt suck |:

Everything else that doesn't fall into one of the other PB categories.
PB&J Lover
Enthusiast
Enthusiast
Posts: 212
Joined: Fri Apr 22, 2005 2:07 pm
Location: U.S.A.
Contact:

spagheti code

Post by PB&J Lover »

No one died of ugly code... especially not when noone else can see it
No so:

A patriot missle missed its target in Desert Storm because the guidance software had been running too long and it had developed a mathmatical precision error (something produced by the conversion from binary to decimal and back) allowing the Scud missle to hit a crowed barracks (killing several US troops).

An Airbus crashed on a demo flight because its computer "thought" it was landing when it was really taking off.

A Peruvian flight crashed in the mountains because the Pilots thought they had dailed in a decent angle when they had really dialed in a decent rate. The difference on the display was a decimal point.

Patients were over-radiated by a medical device because it calculated the intensity incorrectly.

Lots of lives and property have been lost from poor coding. :shock:
-- DB

Any intelligent fool can make things bigger, more complex, and more violent. It takes a touch of genius — and a lot of courage — to move in the opposite direction.

Albert Einstein
PB
PureBasic Expert
PureBasic Expert
Posts: 7581
Joined: Fri Apr 25, 2003 5:24 pm

Post by PB »

> Sometimes coders (or most times) do actually dont see how they are
> stuck in the past trying to optimize their small apps to not use more
> than half a Mb of memory when it WAS necessary years ago but not
> now.

Well, I say it STILL is necessary now. :)

The attitude of "leaving the bloat there" just because the user has 1 GB
of RAM is a lazy and sloppy approach to coding. If something can be done
smaller and faster, it should be. There's no justification for not doing it,
apart from simple laziness.

If you needed a virtual desktop app, and you needed it solely for the
purpose of just switching desktops and nothing else, which of these two
would you choose?

BossKey -- 7 KB -- http://keir.net/bosskey.html
Virtual Desktop -- 3.7 MB -- http://enablevirtualdesktop.com/virtualdesktop/

The answer is simple: you'd pick the tiny 7 KB app! Why? Because nobody
likes bloat for no reason. They can pretend it doesn't matter, but when it
comes down to the crunch, they'll always pick the smaller app. ;)
I compile using 5.31 (x86) on Win 7 Ultimate (64-bit).
"PureBasic won't be object oriented, period" - Fred.
User avatar
blueb
Addict
Addict
Posts: 1111
Joined: Sat Apr 26, 2003 2:15 pm
Location: Cuernavaca, Mexico

Post by blueb »

Lots of lives and property have been lost from poor coding.
Hell.... now you're just trying to scare us. :shock:


I won't be able to sleep for a week. :lol:


blueb
rsts
Addict
Addict
Posts: 2736
Joined: Wed Aug 24, 2005 8:39 am
Location: Southwest OH - USA

Re: spagheti code

Post by rsts »

PB&J Lover wrote:
No one died of ugly code... especially not when noone else can see it
No so:

-snip-
Lots of lives and property have been lost from poor coding. :shock:
ugly code <> poor code. There is a difference.

Ugly is subjective. Poor (buggy) is not.
PB
PureBasic Expert
PureBasic Expert
Posts: 7581
Joined: Fri Apr 25, 2003 5:24 pm

Re: spagheti code

Post by PB »

> ugly code <> poor code. There is a difference.

Agreed. Some of the code in my apps is as ugly as sin, yet the code and what
they do is tight as a drum. I'm also not a believer in one-line-per-command,
as I hate scrolling when coding and try to minimize it as much as possible.
This is partly what leads to ugliness in my apps. :)
I compile using 5.31 (x86) on Win 7 Ultimate (64-bit).
"PureBasic won't be object oriented, period" - Fred.
TerryHough
Enthusiast
Enthusiast
Posts: 781
Joined: Fri Apr 25, 2003 6:51 pm
Location: NC, USA
Contact:

Re: spagheti code

Post by TerryHough »

PB wrote:>Some of the code in my apps is as ugly as sin...
I have noticed that code gets uglier just before the deadline.

Sort of the converse of "the girls all get prettier at closing time"

:lol:

Terry
rsts
Addict
Addict
Posts: 2736
Joined: Wed Aug 24, 2005 8:39 am
Location: Southwest OH - USA

Re: spagheti code

Post by rsts »

TerryHough wrote:
PB wrote:>Some of the code in my apps is as ugly as sin...
I have noticed that code gets uglier just before the deadline.

Sort of the converse of "the girls all get prettier at closing time"

:lol:

Terry
Nice analogy :)

Unfortunately, "rushed" code and forced deadlines can lead to "poor" code too.

"Ugly" I can live with, as long as it's "good".

"Poor", as PB&J Lover pointed out, is another story.
Kale
PureBasic Expert
PureBasic Expert
Posts: 3000
Joined: Fri Apr 25, 2003 6:03 pm
Location: Lincoln, UK
Contact:

Post by Kale »

AJirenius wrote::shock:
Sometimes coders (or most times) do actually dont see how they are stuck in the past trying to optimize their small apps to not use more than half a Mb of memory when it WAS necessary years ago but not now.
Also optimizing code to perfection so it renders all calculations in 4 mSec instead of 50 is also a typical "coder" thing that actually could be compromised tonadays.
I dont say optimizing is bad but somehow you need to see WHERE you need it and where you actually can look at the goal instead and take the fastest road there.
I kind of agree with this. Sometimes you can get a bit too over concerned with how much RAM your program uses etc. but i also understand the need for optimisation. When i write a program, the very first priority of mine is to write extremely neat, re-readable code before anything else is considered. This way i can re-read this stuff months down the line and everything still makes perfect sense to me and pulling things out for re-use on other projects is a breeze. BUT! if i see my app is getting bloated in any way i try cut this down to what i feel comfortable with. I also like to make use of UPX as long as its completely transparent. :)

For me Clear, Readable, Easily Maintainable Code is more important than anything else. ...but then thats just me! :wink:
--Kale

Image
Dare2
Moderator
Moderator
Posts: 3321
Joined: Sat Dec 27, 2003 3:55 am
Location: Great Southern Land

Re: spagheti code

Post by Dare2 »

TerryHough wrote:
PB wrote:>Some of the code in my apps is as ugly as sin...
I have noticed that code gets uglier just before the deadline.

Sort of the converse of "the girls all get prettier at closing time"

:lol:

Terry
:D
@}--`--,-- A rose by any other name ..
Brice Manuel

Post by Brice Manuel »

Because nobody likes bloat for no reason.
Thats what I keep trying to tell all these coders who use .NET
Sub-Routine
User
User
Posts: 82
Joined: Tue May 03, 2005 2:51 am
Location: Wheeling, Illinois, USA
Contact:

Post by Sub-Routine »

BASIC is Spaghetti spelled backwards. I love it!

Rand
Shannara
Addict
Addict
Posts: 1808
Joined: Thu Oct 30, 2003 11:19 pm
Location: Emerald Cove, Unformed

Post by Shannara »

Brice Manuel wrote:
Because nobody likes bloat for no reason.
Thats what I keep trying to tell all these coders who use .NET
Heh, my job requires .NET (C#) scripting for all of their apps. all web based for the most part. Then I come home and am happy for speed and size.
okasvi
Enthusiast
Enthusiast
Posts: 150
Joined: Wed Apr 27, 2005 9:41 pm
Location: Finland

Post by okasvi »

PB wrote:If you needed a virtual desktop app, and you needed it solely for the
purpose of just switching desktops and nothing else, which of these two
would you choose?

BossKey -- 7 KB -- http://keir.net/bosskey.html
Virtual Desktop -- 3.7 MB -- http://enablevirtualdesktop.com/virtualdesktop/
if im right Virtual Desktop opens new explorer.exe to every "virtual" desktop :shock:


and long live small, fast & simple code :)
thefool
Always Here
Always Here
Posts: 5875
Joined: Sat Aug 30, 2003 5:58 pm
Location: Denmark

Post by thefool »

PB wrote: Virtual Desktop -- 3.7 MB -- http://enablevirtualdesktop.com/virtualdesktop/
Okvasi that is another product by same name.
However, i would recommend Dexpot. It uses very little memory but is full of great functionalities! And FREE.
Do a search on google.

edit: http://www.dexpot.de/en/index2.html
User avatar
blueznl
PureBasic Expert
PureBasic Expert
Posts: 6166
Joined: Sat May 17, 2003 11:31 am
Contact:

Post by blueznl »

how to prove prebasuc doesn't suck?

well, what if it does?

;-P

how to prove it doesn't? by showing them cool apps
and to create those nice apps we'd all like to see some additional features (yes, there's the bridge :-))

pb doesn't suck, but it could use some extensions that would eanble us to make it easier to prove our point...
( PB6.00 LTS Win11 x64 Asrock AB350 Pro4 Ryzen 5 3600 32GB GTX1060 6GB)
( The path to enlightenment and the PureBasic Survival Guide right here... )
Post Reply