r/programming • • Mar 11 '13

Programming is terrible—Lessons learned from a life wasted. EMF2012

http://www.youtube.com/watch?v=csyL9EC0S0c
650 Upvotes

368 comments sorted by

View all comments

Show parent comments

122

u/Kminardo Mar 11 '13

Isn't that essentially what most programs boil down to? UIs for database interaction? You have your games and such but then you have those on the web too.

30

u/LongUsername Mar 11 '13

Not 90% of the embedded world, which is 90% of the processors in the world.

22

u/PoppedArt Mar 11 '13

Amen. I was reading this thread and thinking, "What world are these people living in?" Obviously they have a very skewed view of computers and programming. It's sort of like seeing a bag and claiming it can only be used to hold groceries.

20

u/[deleted] Mar 11 '13

It's because there's so damn many web programmers because the vast majority of paid positions are for web apps.

If you haven't spent your university time specializing in something better paid and slightly esoteric (like embedded) you're invariably going to land either in Java middleware for enterprise or web apps.

17

u/PoppedArt Mar 11 '13

You're right, there are a lot of grocery baggers out there. ;-)

13

u/LinXitoW Mar 11 '13

that hurt with floating point accuracy.

4

u/contrarian_barbarian Mar 11 '13

Seriously, I mostly work on hardware interfacing. I don't code anything that directly touches either UIs or databases until the data gets a couple steps farther down the line.

→ More replies (2)

26

u/keepthepace Mar 11 '13

Yeah, none of us work in robotics, data viz, simulation, augmented reality, computer vision, OS development, cryptography, signal processing, drivers, network protocols, compilers...

Note that I am voluntarily taking out anything that uses databases but where UI interaction is not the main focus : medical imaging, data-mining, satellite vision, search engines, genetic information management...

I agree that a lot of the people on my lawn on /r/programming and a lot of programming forums equate web development with development, but really, keep in mind that there is much more to programming.

169

u/chazmuzz Mar 11 '13

Coming to that realisation made it so much easier for me to work out how to code applications

Step 1) Plan your data structures

Step 2) Write UI around data structures

36

u/hai-guize Mar 11 '13 edited Mar 11 '13

This is a new concept to me. Thanks, maybe now I will be able to actually code something properly.

→ More replies (1)

11

u/casualblair Mar 11 '13

I like to do it slightly different:

  1. Plan data structures

  2. Plan ui constructs

  3. WILL IT BLEND? Y = Build it. N = Unnecessary complexity exists, destroy it and try again.

→ More replies (2)

89

u/rabidferret Mar 11 '13

You've got it backwards...

  • Plan the general elements of your UI

  • Write tests for the code that would result in that UI

  • Create your data structures to contain what the UI has told you is needed

  • Write your code to fit the previous elements

107

u/zzalpha Mar 11 '13

Welcome to the top-down vs bottom-up battle! Today we have chazzmuzz and rabidferret. Who will win? Only time will tell!

44

u/warbiscuit Mar 11 '13

I'm not even sure why this debate keeps going.

User intent drives frontend design. Frontend design drives backend design. Backend design affects frontend design. Frontend design affects how the users think about the topic, and thus affects user intent.

It's all one large cycle, no matter where you start. I've always figured the goal was to start somewhere ("top" or "bottom" or wherever), make general design pass all the way around, bringing in external requirements as appropriate at each point (what the user wants, what the ui layer can do, what your database can do). Then keep going, until you reach a steady state where all parts generally fit together properly.

→ More replies (8)

10

u/maestroh Mar 11 '13

The debate isn't top down vs bottom up. If you develop code that you can test, it doesn't matter if you start at the bottom or top. In either case, you can mock the code out to make sure that each component works correctly. If you don't write testable code, you have to rely on setting up your environment before testing anything. This means the only way to test is by stepping through your code.

Writing code with tests gives you decoupled code and the ability to refactor the code later with confidence that it works correctly after the change. Writing the database layer first then building on top of that layer gives you coupled code. When a change is made, there could be a bunch of unintended side effects that can only be found by trial and error.

→ More replies (4)
→ More replies (3)

56

u/headchem Mar 11 '13

Heh, nice one. I take it one step further and write my CSS first, then design my normalized database around that. :-)

13

u/[deleted] Mar 11 '13

drink a bottle of Russian Standard, while drunk do some shitty wireframes on MS-Paint,.. then design your optimized database around that.

→ More replies (1)

0

u/[deleted] Mar 11 '13

[deleted]

→ More replies (2)

7

u/[deleted] Mar 11 '13

I can't tell if this is sarcastic or not..

→ More replies (78)

5

u/[deleted] Mar 11 '13

Writing UI around data structures is not always a good idea, because people often do not understand them. I.e. when you normalize well and make an 1:N connection in a new table, people often do not understand why it is needed, so you denormalize in the UI so that every record can look like having Contact Person 1, 2, 3 instead of a list which they don't understand.

→ More replies (51)

39

u/[deleted] Mar 11 '13

Most programs? What about those programs for doing actual computation? Whether it be numerical or symbolic computation? That's where the real fun actually lies in programming.

15

u/[deleted] Mar 11 '13

That's why I have actively avoided web development, it's so boring.

8

u/pi_over_3 Mar 11 '13 edited Mar 12 '13

I totally get that, but I like creating something that I can "see" and that other people use.

Writing code that just crunches numbers for a car's onboard computer? Boring.

12

u/vanderZwan Mar 11 '13

I'm just glad people like both of you exist to make the lives of everyone else better.

→ More replies (1)
→ More replies (3)
→ More replies (8)

9

u/hyperforce Mar 11 '13

I like to think of them as curated veneers. If people really wanted a database, you would just give them a SQL prompt. But what they really wanted is a guided tour, and yes most of the operations resemble CRUD. But a good UI is one that doesn't make the CRUDing so obvious.

→ More replies (29)