Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Post
  • Reply
tef
May 30, 2004

-> some l-system crap ->

Bloody posted:

that was because u were talking 2 them about vb

nah it was what was written inside vb that was the true horror

Adbot
ADBOT LOVES YOU

DONT THREAD ON ME
Oct 1, 2002

by Nyc_Tattoo
Floss Finder
are there any good books on high level program design/architecture? i understand how programming works for the most part, but once i start getting over 10 or so classes my poo poo becomes more and more of a clusterfuck

PleasingFungus
Oct 10, 2012
idiot asshole bitch who should fuck off

tef posted:

ps people's faces when they discover trigraphs

the best thing about trigraphs is that they're impossible to google unless you already know what they are

never seen them in the wild though; sounds like a great time

Jonny 290
May 5, 2005



[ASK] me about OS/2 Warp

chumpchous posted:

are there any good books on high level program design/architecture? i understand how programming works for the most part, but once i start getting over 10 or so classes my poo poo becomes more and more of a clusterfuck

read Clean Code, Beautiful Code and Beautiful Data. they're not 100% perfect but they all have great takeaways and are not too thick

some of it is more micro scale, why bad var naming is bad etc, but they have good high level discussions too

Shaggar
Apr 26, 2006

tef posted:

http://web.archive.org/web/20060505021322/http://classiccmp.org/pipermail/cctech/2005-April/042999.html


On the Joel Spolsky subject he was a basically ignorant junior employee
who left Microsoft after a short number of years. His short sighted
decisions to take the VB macro language in Excel in its own directions
caused 6 other major applications that were doing BASIC macro languages
to diverge and not be able to share any macro programs between the
applications. He made other similarly stupid decisions like creating a
custom programming interface for BASIC in Excel instead of sharing a
common interface as strongly recommended. The applications group spent
30 man-years integrating custom interfaces for each application with the
Office 95 applications. In Office 98 they tossed it all and went back
to my original suggestion which only took 1.5 man-years to develop and
provided better commonality and learning between the applications.

and office hasn't changed since!

DONT THREAD ON ME
Oct 1, 2002

by Nyc_Tattoo
Floss Finder

Jonny 290 posted:

read Clean Code, Beautiful Code and Beautiful Data. they're not 100% perfect but they all have great takeaways and are not too thick

some of it is more micro scale, why bad var naming is bad etc, but they have good high level discussions too

small scale stuff is probably good for me too. thanks

MeruFM
Jul 27, 2010
or maybe code complete

is that book still cool? Becuase i know even though programming is a SCIENCE, it feels more like fashion

uG
Apr 23, 2003

by Ralp

Shaggar posted:

and office hasn't changed since!

wrong office now opens new spread sheets in their own window

Zhentar
Sep 28, 2003

Brilliant Master Genius

Jerry SanDisky posted:

can you give an example of what the MUMPS you use on a daily basis looks like? because i've only seen MUMPS in the context of horror stories

I was trying to translate that %DTC code you posted in the other thread, but it was too awful to understand and I gave up.

Instead, I have this lying around. I think it's pretty mediocre code, but here's a simple solution to Project Euler problem #10:
code:
	; Finds the sum of all primes up to limit
EulerProblem10(limit) n num,check,sum
	; Determine primes using Sieve of Eratosthenes
	;
	; Initialize the integer array, skipping even numbers to save time
	f num=2,3:2:limit s ^||PROB10(num)=""
	;
	; Remove non-primes from the integer array
	s num=""
	f  s num=$o(^||PROB10(num)) q:num=""  d
	. f check=num*num:num:limit k ^||PROB10(check)
	;
	; Multiply the primes left in the array
	f  s num=$o(^||PROB10(num)) q:num=""  s sum=sum+num
	; Clear the temporary array
	k ^||PROB10
	q sum

Jerry SanDisky posted:

also what's the turnover like at Epic? what does the experience distribution look like? do you get people with lots of experience at other jobs coming in or mostly young/new grads?

Last I heard, voluntary turnover for developers was somewhere in the low 10s, so solidly in the healthy company range. The majority of our hiring is recent grads.

Blotto Skorzany
Nov 7, 2008

He's a PSoC, loose and runnin'
came the whisper from each lip
And he's here to do some business with
the bad ADC on his chip
bad ADC on his chiiiiip

MeruFM posted:

or maybe code complete

is that book still cool?



Throw an Extra Element on the End of each Array

shrughes
Oct 11, 2008

(call/cc call/cc)
code complete is by and for retards

Bloody
Mar 3, 2013

shrughes posted:

code complete is by and for retards

so programmers

Sapozhnik
Jan 2, 2005

Nap Ghost

Bloody posted:

calling arm coding these days embedded is pretty disingenuous at least in my mind

to me, embedded is reinventing the wheel every goddamn hour and feeling blessed to have a compiler and like any documentation at all

arm is just like well i have to call a slightly different version of gcc

embedded horror stories are my favorite though :allears:

It's embedded if you don't have enough RAM to run Linux on it, as far as I'm concerned :colbert:

afaik you need a minimum of 16MB for even embedded lunix, which means you need DRAM which is really loving hard to design PCB traces for apparently. idk this is a bit beyond my meager level.

Something like FreeRTOS seems like a good compromise. I don't know too much about FreeRTOS, I just really regret not using it for my big grad school project which ended up turning into some gigantic continuation-passing horror show.

coffeetable
Feb 5, 2006

TELL ME AGAIN HOW GREAT BRITAIN WOULD BE IF IT WAS RULED BY THE MERCILESS JACKBOOT OF PRINCE CHARLES

YES I DO TALK TO PLANTS ACTUALLY

MeruFM posted:

Becuase i know even though programming is a SCIENCE

lol

Blotto Skorzany
Nov 7, 2008

He's a PSoC, loose and runnin'
came the whisper from each lip
And he's here to do some business with
the bad ADC on his chip
bad ADC on his chiiiiip

Mr Dog posted:

Something like FreeRTOS seems like a good compromise. I don't know too much about FreeRTOS, I just really regret not using it for my big grad school project which ended up turning into some gigantic continuation-passing horror show.

i've been using freertos for about 7 months at work. it's far, far from perfect but just having a mostly working task scheduler and message queues out of the box is fantastic, and the memory footprint is pretty reasonable

coffeetable
Feb 5, 2006

TELL ME AGAIN HOW GREAT BRITAIN WOULD BE IF IT WAS RULED BY THE MERCILESS JACKBOOT OF PRINCE CHARLES

YES I DO TALK TO PLANTS ACTUALLY

Jonny 290 posted:

read Clean Code, Beautiful Code and Beautiful Data. they're not 100% perfect but they all have great takeaways and are not too thick

some of it is more micro scale, why bad var naming is bad etc, but they have good high level discussions too

readin these too, cheers jonny

tef
May 30, 2004

-> some l-system crap ->

Jonny 290 posted:

read Clean Code, Beautiful Code and Beautiful Data. they're not 100% perfect but they all have great takeaways and are not too thick

some of it is more micro scale, why bad var naming is bad etc, but they have good high level discussions too

practice of programming by kernighan and pike

Bloody
Mar 3, 2013

Mr Dog posted:

It's embedded if you don't have enough RAM to run Linux on it, as far as I'm concerned :colbert:

afaik you need a minimum of 16MB for even embedded lunix, which means you need DRAM which is really loving hard to design PCB traces for apparently. idk this is a bit beyond my meager level.

Something like FreeRTOS seems like a good compromise. I don't know too much about FreeRTOS, I just really regret not using it for my big grad school project which ended up turning into some gigantic continuation-passing horror show.

eh you can get that much RAM with various forms of garbage ram such as serial ram it's just gonna be a pos

i have yet to actually design my own arm board though but im looking forward to it. i don't think dram should be particularly difficult to lay out for; the specs exist... just keep adding layers until it all works.

Suspicious Dish
Sep 24, 2011

2020 is the year of linux on the desktop, bro
Fun Shoe

tef posted:

line numbers work like sysv init scripts :yayclod:

tef have i asked you before if you like systemd

your opinion is important to red hat, inc. and i will present it as an "expert community opinion" (yes this is really a thing)

Nomnom Cookie
Aug 30, 2009



systemd is better than init scripts. u better put it in centos 7 or im going to mutter angrily

Carthag Tuek
Oct 15, 2005

Tider skal komme,
tider skal henrulle,
slægt skal følge slægters gang



tef posted:

practice of programming by kernighan and pike

tef
May 30, 2004

-> some l-system crap ->

Jonny 290 posted:

read Clean Code, Beautiful Code and Beautiful Data. they're not 100% perfect but they all have great takeaways and are not too thick

some of it is more micro scale, why bad var naming is bad etc, but they have good high level discussions too

the only good chapter in beautiful code is the one by kernighan and pike and it is a reprint of the practice of programming

prefect
Sep 11, 2001

No one, Woodhouse.
No one.




Dead Man’s Band

tef posted:

the only good chapter in beautiful code is the one by kernighan and pike and it is a reprint of the practice of programming

it's interesting that guys who are closely associated with c, which is terrifying to behold, can also write good books about programming well

MORE CURLY FRIES
Apr 8, 2004

prefect posted:

it's interesting that guys who are closely associated with c, which is terrifying to behold, can also write good books about programming well

the world is a self perpetuating mess caused by the good intentions of clever people

Carthag Tuek
Oct 15, 2005

Tider skal komme,
tider skal henrulle,
slægt skal følge slægters gang



prefect posted:

it's interesting that guys who are closely associated with c, which is terrifying to behold, can also write good books about programming well

therere a lot of C-things that they straight up tell you not to do in PoP

Suspicious Dish
Sep 24, 2011

2020 is the year of linux on the desktop, bro
Fun Shoe

Nomnom Cookie posted:

systemd is better than init scripts. u better put it in centos 7 or im going to mutter angrily

we officially announced it for rhel7 along with complete sysv backcompat

centos is free to make their own decisions, but since its "free/unsupported rhel", then i bet they will use systemd

GameCube
Nov 21, 2006

tef posted:

practice of programming by kernighan and pike

bought this without a second thought

do u understand the power u wield

double sulk
Jul 2, 2010

DONT THREAD ON ME
Oct 1, 2002

by Nyc_Tattoo
Floss Finder
i ended up with practice of programming, beautiful data, and some other one i cant remember. thanks to you guys i will be able to display these in my office and pretend to be a good programmer

trex eaterofcadrs
Jun 17, 2005
My lack of understanding is only exceeded by my lack of concern.
always display your trophy copy of TAOCP in the office

my dad got me a really nice set of vol 1,2 and 3 when i got my first "career" job

tef
May 30, 2004

-> some l-system crap ->

Werthog 95 posted:

bought this without a second thought

do u understand the power u wield

i'm using it responsibly. it's one of the few books i've lent out, and never seem to get back. "I'm still finding it useful"

Symbolic Butt
Mar 22, 2009

(_!_)
Buglord


You should call it "the smart dogge book"

Bizarro Buddha
Feb 11, 2007

tef posted:

i'm using it responsibly. it's one of the few books i've lent out, and never seem to get back. "I'm still finding it useful"

ok fine I'll buy it too geez

coffeetable
Feb 5, 2006

TELL ME AGAIN HOW GREAT BRITAIN WOULD BE IF IT WAS RULED BY THE MERCILESS JACKBOOT OF PRINCE CHARLES

YES I DO TALK TO PLANTS ACTUALLY

Werthog 95 posted:

bought this without a second thought

do u understand the power u wield

same

well, borrowed from library. reading now, good stuff. apart from the bit where i get angry at the bad code examples.

clean code/beautiful code/beautiful data are next up

anyone else w/ recommendations for books on non-language-specific stuff

Symbolic Butt
Mar 22, 2009

(_!_)
Buglord
I've read a good chunk of it but I went all back because now I know a little more C. I just have the need/OCD to understand everything in the book, even if I can't get up to care much about C.

tef
May 30, 2004

-> some l-system crap ->

Symbolic Butt posted:

I've read a good chunk of it but I went all back because now I know a little more C. I just have the need/OCD to understand everything in the book, even if I can't get up to care much about C.

there are examples in java too. there isn't too much C specific stuff in it iirc, it's more general than say other kernighan/pike books.



Bizarro Buddha posted:

ok fine I'll buy it too geez

it's a really short, good book on general programming practice that's accessible and well written. unlike code complete or beautiful code or other books, it isn't a book crammed with filler.

the chapters are: Style, Algorithms and Data Structures, Design and Implementation, Interfaces, Debugging, Testing, Performance, Performance, Notation.
the chapters are about thirty pages each, generally stand alone, and the appendix collects the idioms/adages so you can see a quick summary.

tef
May 30, 2004

-> some l-system crap ->
i mean, you could just read the appendix, but the rules are illustrated well with nuance and context throughout the book.

quote:

Several chapters contain rules or guidelines that summarize a discussion. The rules are collected here for easy reference. Bear in mind that each was presented in a context that explains its purpose and applicability.

Style
Use descriptive names for globals, short names for locals. Be consistent.
Use active names for functions.
Be accurate.
Indent to show structure.
Use the natural form for expressions.
Parenthesize to resolve ambiguity.
Break up complex expressions.
Be clear.
Be careful with side effects.
Use a consistent indentation and brace style.
Use idioms for consistency.
Use else-ifs for multi-way decisions.
Avoid function macros.
Parenthesize the macro body and arguments.
Give names to magic numbers.
Define numbers as constants, not macros.
Use character constants, not integers.
Use the language to calculate the size of an object. Don't belabor the obvious.
Comment functions and global data.
Don't comment bad code, rewrite it.
Don't contradict the code.
Clarify,don't confuse.

Interfaces
Hide implementation details.
Choose a small orthogonal set of primitives.
Don't reach behind the user's back.
Do the same thing the same way everywhere.
Free a resource in the same layer that allocated it.
Detect errors at a low level, handle them at a high level.
Use exceptions only for exceptional situations.

Debugging
Look for familiar patterns.
Examine the most recent change.
Don't make the same mistake twice. Debug it now, not later.
Get a stack trace.
Read before typing.
Explain your code to someone else.
Make the bug reproducible.
Divide and conquer.
Study the numerology of failures.
Display output to localize your search.
Write self-checking code.
Write a log file.
Draw a picture.
Use tools.
Keep records.

Testing
Test code at its boundaries.
Test pre- and post-conditions.
Use assertions.
Program defensively.
Check error returns.
Test incrementally.
Test simple parts first.
Know what output to expect.
Verify conservation properties.
Compare independent implementations.
Measure test coverage.
Automate regression testing.
Create self-contained tests.


Performance
Automate timing measurements.
Use a profiler.
Concentrate on the hot spots.
Draw a picture.
Use a better algorithm or data structure.
Enable compiler optimizations.
Tune the code.
Don't optimize what doesn't matter.
Collect common subexpressions.
Replace expensive operations by cheap ones.
Unroll or eliminate loops.
Cache frequently-used values.
Write a special-purpose allocator.
Buffer input and output.
Handle special cases separately.
Precompute results.
Use approximate values.
Rewrite in a lower-level language.
Save space by using the smallest possible data type.
Don't store what you can easily recompute.


Portability
Stick to the standard.
Program in the mainstream.
Beware of language trouble spots.
Try several compilers.
Use standard libraries.
Use only features available everywhere.
Avoid conditional compilation.
Localize system dependencies in separate files.
Hide system dependencies behind interfaces.
Use text for data exchange.
Use a fixed byte order for data exchange.
Change the name if you change the specification.
Maintain compatibility with existing programs and data.
Don't assume ASCII.
Don't assume English.

These are just the take-home bits, but the book explains how to do these things and why.

tef
May 30, 2004

-> some l-system crap ->
in the same way others steal from peopleware (also a good book, but more of a book for those fighting management), I steal from the practice of programming.

MeruFM
Jul 27, 2010
sweet, now i don't have to buy the book

quote:

Use else-ifs for multi-way decisions.
guido was right?

Adbot
ADBOT LOVES YOU

The Leck
Feb 27, 2001

prefect posted:

there's a book called "working effectively with legacy code" where the author defines "legacy code" as "code without tests"
how is this book? I've been finding myself working on some legacy code (in all of the senses mentioned in this thread so far) and it might be nice to have some help in not making it worse.

  • 1
  • 2
  • 3
  • 4
  • 5
  • Post
  • Reply