[ / / / / / / / / / ] [ dir / ask / dcaco / fur / hypno / o / sl / ttgg / u ][Options][ watchlist ]

/prog/ - Programming

Programming board

Catalog

You can now write text to your AI-generated image at https://aiproto.com It is currently free to use for Proto members.
Name
Email
Subject
Comment *
File
Select/drop/paste files here
* = required field[▶ Show post options & limits]
Confused? See the FAQ.
Expand all images

File (hide): 1436916529726.jpg (906.61 KB, 3072x2098, 1536:1049, 1423535624804.jpg) (h) (u)

[–]

360de2 (1) No.2827>>2839 >>3043 >>3096 >>3136 [Watch Thread][Show All Posts]

What are the basic things every programmer should know? Any practical advice you can share with new programmers like myself?

For example:

1) Several languages

2) Web development

3) Database basics

4) ability to think abstractly

5) Math?

Please add any of your own or relevant advice/tips/useful skills?

d156a8 (4) No.2828>>2979

In my opinion (as someone who only does javascript) you should have a sophisticated, indepth understanding of one useful programming language. For example as a javascript programming you should know the difference between Math.floor, Math.ceil, Math.round and Math.trunc, you should know what "x = y || 0" does, you should know the difference between binary (~) and logical (!) negation, you should know how to use regexp with string methods, etc.


8c5403 (1) No.2833

Modeling and organization


eee68e (1) No.2836

Learn pyhton or ruby (I prefer python) a ood tutorial for python is http://learnpythonthehardway.org/book/


33dca4 (1) No.2839>>2979 >>2994

>>2827 (OP)

>Several languages

No

>Web development

No

>Database basics

No

>ability to think abstractly

Yes

>Math?

Sometimes

>Please add any of your own or relevant advice/tips/useful skills?

Obsession and perseverance are the most important skills.


d5b871 (1) No.2842

The most important thing to know are algorithms and data structure.

Boring and dry, but will stop you from reinventing the wheel (badly) many times.


ec64fd (1) No.2848

How to make edit and delete files/folders on Linux

A programming language ofc

How to use SSH


8c9323 (6) No.2920

Your requirements are shit

Any good programmer should know:

1. Assembler (If you don't know how your code is compiled, how can you make intelligent decisions about it)

2. Functional programming

3. How your stack frame is built

4. Exactly how the linking works on your target platform

5. How to properly use a text shell

6. Enough math to properly analyze the performance of your code before running it and to use algorithms to speed up slow logic, otherwise optimization is just throwing things and hoping something works


442d2b (1) No.2921

Know how to estimate a project's length. Know how to ensure someone else takes the blame/liability for your mistakes.


000000 (1) No.2928>>2979

Asking for the "must knows" is never good. And there's different ways of doing things.

1) Several languages

C, some asm you can run, some sort of Unix shell

2) Web development

_In_ web developtment or if you should learn web development?

Only learn it if you, like, feel like it..

HTML is shit, and you might feel constrained without using javascript which is utter shit.

3) Database basics

flat text all the way.

4) ability to think abstractly

No, it's bullshit and rots your mind.

5) Math?

Only trivial arithmetic is used except in niche fields.


139f02 (1) No.2937

>Several languages

I wouldn't say that you need to know multiple languages to be a good programmer, but it certainly helps. Especially if they have quite different styles.

>Web development

Web pages? Nice to know the basics. Network programming? Yeah, you'll want to know how to do that.

>Databases

Definitely. Learning SQL makes it a lot easier to get a job.

>Ability to think abstractly

Yes.

>Math

Some.

My additions:

Common data structures. How they work, where you'd use them, where you wouldn't use them.

In particular: arrays, linked lists, trees, hash tables

Common algorithms - particular sorting and searching for the above data structures. Also how they work, and where you would and wouldn't use them.

Command line


f2ef37 (2) No.2979>>2980

>>2828

these are things you learn in the first chapter of any language book ever. not sure if troll or not

>>2839

how's that philosophy degree paying these days?

>>2928

>javascript is utter shit

this is absolutely untrue. unfortunately, most people who write javascript are shit at programming, let alone any sort of software engineering. but you can't blame the language for its poor reputation, it's actually very nice if you dig into it.


8c9323 (6) No.2980>>2984 >>2985

>>2979

Javascript is absolute shit.

- No module system

- Weak typing

- Horrible handling of the "this" variable (is "this" the current context in callbacks? Not usually.)

- NO type security

- Horrible scoping rules (vars declared in loops and if blocks are scoped to the function, not their enclosing block)

- Functionality that is essentially broken is still a core part of the language (like ever using == instead of ===)

- Laziness. Most languages have strict formatting rules for a reason (optional semicolons are retarded, and can fuck you up if the interpreter decides to insert a semicolon where you don't want one).

- Lack of integer values. The only number value is a 64-bit float.

- global variable abuse. Everything uses global variables, and they're everywhere. It's nearly impossible to know when a global has changed or what changed it if there are multiple scripts at play in one page. Also, globals are implicitly declared, so if you forget a "var" somewhere, you've created a global.

- All the stupid fucking behavior that is based on strings. Array to number comparisons convert the array to a string and then to a number to compare. Array sorts of number arrays do an alphabetic sort instead of numeric. A blank string is false. A string containing any whitespace is equal to 0 ("\n\n" == 0 is true).

- Literal/wrapper incompatibility. A literal string is not a String.

There's a reason everybody uses languages that transpile into Javascript left and right. It really is a shit language, and you know that if you've spent any extended time with it and any actual language.


d156a8 (4) No.2984

>>2980

Static typing is coming in ES7. I don't know what you're complaining about.


f2ef37 (2) No.2985>>2987

>>2980

nigger pls.

this is 8chan. your 2 months of exposure to C (and the fact that you made it to chapter 4 of K&r) doesn't actually mean you've spent any time with an 'actual' language.

you've identified some of the things you have to work around to take advantage of js, but nothing you mentioned is insurmountable. and furthermore, the language (if you're not retarded) allows for so much more room for expression that i can't even begin to paint a full picture.

>no module system

try harder nigger. even if you're only using js in the browser )whups( there's still browserify. honestly. commonjs is everywhere.

>weak typing

the compile time errors that a static typed language will catch are easy errors to track down no matter what. this isn't a real savings, and dynamic tying (again, if your'e not a retard) can really be a time saver, and it ends up being a lot of fun. call me crazy, i'm ok w/ omitting unnecessary boiler plate when i can.

>NO type security

smh you said the same thing twice

>Horrible scoping rules

here you literally define js scope rules. yes, function scope is bizarre at first. shit programmers can't grok it. do you even closures? pick up a functional programming book.

>Functinality that is broken

ok, you got me here. there are some bass ackwards rules. just don't fucking use ==. is it really that hard?

>Laziness

again. don't be stupid and new. use a fucking linter for god sakes.

>Lack of integer values

honestly this isn't an issue. js doesn't show up on the tiny embedded machines you'll find C running on, p much every comp that is running a browser w/ js enabled can (gasp) handle a 64-bit floating point integer.

>b.b.but my rounding

fuck off. you can treat it like an int (or round your float properly if you need) and it's not that much overhead.

>global variable abuse

i don't know how many times i can say this. don't be fucking retarded. do you ever declare a variable in another language (excluding python, that's for 12 yr olds) w/o declaring something (like a type) before it? just type var before every variable. jesus christ i remember running into the global scope issue as well at some point. it was really tough being 15 and not knowing anything about programming.

>stupid string behavior

im sorry. you got close, but you didn't quite get there. what you're alluding to (w/ the nonsense about string conversion etc) is that sometimes js tries to be too smart. the real issue here is the multiple versions of 'null' or 'undefined' or 'NaN' and the equality surrounding this issue. There is some weird behavior, but if your'e not stupid these lack of rules can let you be really expressive.

If you take time to write clean code (which you should do w/ any language) and implement best practices (which is all the the transpilers you're talking about do), you can wind up with pretty much any program you could imagine with other languages, with a lot more freedom on top of it. shit programmers hate on 'shit' languages.


8c9323 (6) No.2987>>2996

>>2985

I've been using C for 8 years and JavaScript professionally for 3.

That's not what a module system is. A module system is the ability to properly import libraries from within a script, as well as facilities to properly segregate libraries so you don't have name collision. What happens of you source two javascript "libraries" that both export functions to the same global name?

Dynamic typing saves next to no time at all. As if putting in a single type signature really is saving you more than half a second.

>smh

Quit being a faggot, this isn't your twatter.

Closures don't depend on those scoping rules, you tard. Look at any other language that does it better, like Lua or Python.

The ability to use a linter doesn't make it excusable. I know they don't want to break backwards compatibility, but it's still inexcusable.

Lack of integer values IS an issue if you have a script that is expecting to do a lot of work changing a single integer over a period of time (like a counter or timer) without magically accruing decimal places.

> do you ever declare a variable in another language

You usually don't, which is why every other language will shit on your face for trying. The only other language I have to use regularly that handles it like this is Lua, and it's stupid there, too.

> it was really tough being 15 and not knowing anything about programming

"I got used to it" does not excuse a shit language's weaknesses. If I wanted no variable protection, I'd be using assembler.

>js tries to be too smart

No, JS tries to be too lenient. It tries to avoid screeching to a halt if you feed it bad data, preferring to try to happily chug garbage instead of crash (which usually leads to a crash in an unrelated section later that is a bitch to debug). "Convert everything into a string and then compare" is not smart. Having a newline string compare equal to numerical 0 is retarded. I know the === operator helps alleviate this, but it doesn't excuse it.

It's not about not being able to write the same program as any other language, that's the basic tenant of Turing completeness. You could technically write nearly any program in CSS and HTML with html5, because CSS lets you implement logic switches. I could write the same programs in Visual Basic I can in C, C++, Python, Perl, or any other language, it doesn't mean that Visual Basic is as good as any of those other languages in any way. Hell, I could do nearly the full equivalent in Windows CMD or POSIX sh, doesn't make either of them a good fully-featured programming language. You're misunderstanding that it's a language's job to facilitate writing clean, correct code. Again, if I wanted no extra facilities or checking, I'd be using assembler. There is value to static typing, proper namespacing, static checking, and real scoping rules. "Being able" to do big projects in a language doesn't immediately make it good.

And what is this extra "freedom" that JavaScript offers that any other (better) dynamic language doesn't? Use either Python or Ruby as an example. At a language level (meaning no "it's already running everywhere" argument), what does JavaScript offer that Ruby or Python don't?

> shit programmers hate on 'shit' languages

Don't tell me you're really implying there can not be a bad programming language, only bad programmers. What's with all those 'shit' industry veterans talking about how bad PHP is?

Think of all the people you know who have been programming for 15 or more years targeting the web, and think about how many of them actually prefer to program in vanilla JavaScript without a transpiler. I haven't come across a single person in my professional career who actually likes JavaScript as a language, even the ones who love other super-dynamic toy languages like Ruby.


845f28 (1) No.2994>>3015

>>2839

So do you put "I know only one language, can't develop on the web, don't know shit about DBs, but I can think abstractly and I perservere!" on your resume?


8c9323 (6) No.2996>>3008

>>2987

One more point:


js> [] + []
""
js> [] + {}
"[object Object]"
js> {} + []
0
js> {} + {}
NaN

Javascript is unpredictable dogshit.


d156a8 (4) No.3008

>>2996

You're an idiot. You're too stupid for Javascript.

I'll even explain #3 for you.

+ either concatinates strings or adds two numbers together. It of course coerces types if need be. You can use it as a unary operator to test how something coerces (only if it coerces to a number) for example +[5] is 5. An empty array is 0. Thus 0 + 0 is 0.


8c9323 (6) No.3009>>3013

>An empty array is 0

Then why does 1 + an empty array become a string?


js> 1 + []
"1"
js> [] + 1
"1"

If an empty object corces to 0, then why does the following happen?


js> {} + 0
0
js> 0 + {}
"0[object Object]"
js> +{}
NaN
js> {} + {}
NaN
js> {} + 1
1
js> ({}) + 1
"[object Object]1"

Even if you can explain why these things happen, what is the practical purpose of this? Why even have these kinds of "features" instead of sane type coercion? What is really being gained? Even Perl's type coercion is saner than this.

And why are you defending a language for being unpredictable? I understand it's probably the only language you know, but there is a point to give up and admit that some of this shit isn't really defensible.


d156a8 (4) No.3013>>3014

>>3009

Look, I have to be honest, I'd like more sane type coercian, but this is what they chose in the beginning and they have to stick to it for backwards compatibility.

On this page there is a div IDed reply_3009. Paste in

reply_3009.style.background = "red"
into your browser console. That's only in there for backwards compatibility as far as I'm aware, just like current type coercians.


8c9323 (6) No.3014

>>3013

That's the point though. Most of the language is like that. It was a hobbled-together language made to fill a simple purpose (dynamic client-side webpages) and it is used for things way beyond that purpose now, and the web isn't even close to the same thing as it was when javascript was developed for it, and the rust is showing to a huge degree. Javascript was developed when the web was hugely static pages, and dynamic sites were nearly nonexistent. It wasn't made to continually run and process and work with data over an extended period, it was built to make a web page move and change dynamically in the client side. It's literally only there because it was there first.


44c9d0 (1) No.3015

>>2994

Why would you put what you can't do on your resume?


875989 (1) No.3043

>>2827 (OP)

No one can agree on that. That's why "Software Engineer" doesn't have a certification like real engineering: no one can agree on what the basic skill set and knowledge of one is.


5f22b6 (1) No.3096

>>2827 (OP)

OOP isnt all that gr8

inb4 muh C++


e37735 (1) No.3136

>>2827 (OP)

>Math?

For background: I don't have a ton of experience programming, and I'm more of a hobbyist, but I've taken a fair amount of math.

For general mathematics, it seems like everything up to and including pre-calc should be useful to most people. From there, it's kind of fuzzy. Calc I explains some useful concepts, like dealing with rates of change and optimization problems. Calc III expands on this by showing how to use calc I concepts with multiple variables. Calc II is kind of an oddball. It deals with more difficult integration that I can't imagine comes up too often in programming. Similarly, I doubt most people would find concepts from more advanced math like ODE to come up in programming often.

Oddly, I found some things from an introductory logic class to be helpful when I was teaching myself assembly. Logical operators taught in the class, such as AND and OR, work identically in programming, and working with truth tables resembles working with binary a bit. Learning more about algorithms and good software design would probably be more useful to me, but I'm tempted to read more about symbolic logic. Even if it doesn't have practical application for me, it seems like an interesting field.


a46dc0 (1) No.3173

The basic things a programmer should know is how to program that's it. It's nice to know algorithms, automata and tricks like the book Hacker's Delight but doesn't matter unless you have a specific "career goal" then look up that goal and see what you need for it




[Return][Go to top][Catalog][Screencap][Update] ( Scroll to new posts) ( Auto) 5
26 replies | 0 images | 18 UIDs | Page ?
[Post a Reply]
[ / / / / / / / / / ] [ dir / ask / dcaco / fur / hypno / o / sl / ttgg / u ][ watchlist ]