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
unixbeard
Dec 29, 2004

Yeah it's a totally dumb assertion, if people dont get it first time round either they have a lovely teacher, bad source material or both.

I did not really "get" C until my third attempt at learning it. The first two times I was using some books that turn out to be embarrassingly bad in hindsight, but as a neophyte I had no way to tell. It went a lot better once I had a copy of K&R and APUE.

Adbot
ADBOT LOVES YOU

Suspicious Dish
Sep 24, 2011

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

Hard NOP Life posted:

People just spout poo poo that conforms to their views and selectively ignore everything else. I posit that the notion that programming is an innate ability strokes the egos of those that, so they ignore that redaction.

"I am special because we have some ability that makes us able to understand X, and you will never be able to, ever" is prevalent in every industry, and in humans and psychology in general.

"It's all luck and chance" is more satisfying than "it's a lot of hard work and practice".

It's the same thing with that "rockstar programmers" paper from the 60s, using a sample set of 11 and 20-minute interviews about interactive shell sessions to falsely determine that the best programmer is 10x more efficient than an average.

It's of course an extremely dangerous attitude to have: people quit early because they think they don't have the brains (or the body parts), and people who are successful feel entitled because they are gifted.

NovemberMike
Dec 28, 2008

Blunt Force Trauma posted:

Hello,

I hope this is the right thread, I skimmed through a bit of it without finding my answer, but it's a huge thread!

What are the standard rates for PHP/MySQL developers working on a one-off project? I've been doing some googling and I've seen rates anywhere from $20/hour to $200/hour and in these cases I don't know if the guys who are willing to work for $20/hour are going to produce poor quality work, or if the guys charging $200/hour are just ridiculously expensive. PHP is a pretty common language, so I'm leaning towards the latter, but even if that's true I don't know if $20/hour would be bottom-tier work or not. Anyone care to share some anecdotes?

$20/hr is low, $200/hr is high (but not that high). Now, the $20/hr guy could produce great work and the $200/hr guy could be terrible. Judging cost by language is also a pretty terrible idea, the cost is more about the complexity of the project and the working conditions. Also, why are you using PHP/MySQL?

Marta Velasquez
Mar 9, 2013

Good thing I was feeling suicidal this morning...
Fallen Rib

Seashell Salesman posted:

No way the third one isn't mostly experience.

Complete inexperience goes for a premium as well.

Zhentar
Sep 28, 2003

Brilliant Master Genius
The retraction paper no more proves that there isn't a binary "getting it" than the original "proved" that there is. The two papers tested, and disproved, a possible test for programming aptitude (and if you're trying to argue that there is no aptitude for programming at all, then I'd argue that you have a strong aptitude for being a dumbass). Unfortunately, I'm not aware of any papers that have successfully established an aptitude test, so despite our speculation about what is important or hard to learn and what isn't, we really don't know.

unixbeard
Dec 29, 2004

In my opinion if you have the intellectual capacity to solve something like

3x + y = 5
-5x + 4y = 3

you are quite capable of learning to program, and how well you do is mostly a function of how hard you work at it, which itself is mostly a function of time (like most things). It's a relatively long route going from "hello world" to independently developing stuff that other people think is good and want to use, but subject to a reasonably low bar I think most people can get there if they work at it long enough. If they dont it is more likely due to Other poo poo than some inherent inability.

unixbeard fucked around with this message at 08:04 on Sep 12, 2013

unixbeard
Dec 29, 2004

Also if you think code is art I suggest you go look at more art

1337JiveTurkey
Feb 17, 2005

You can make programming as hard as you want it to be. Easy is a bit more hit and miss.

tef
May 30, 2004

-> some l-system crap ->

baquerd posted:

Fairly non-scientific studies have shown that either you "get it" out of the gate or you will never really get it.

As has been beaten to death, there isn't such a thing as a natural born programmer. To co-opt Thomas Paine: "the idea of hereditary legislators is as inconsistent as that of hereditary judges, or hereditary juries; and as absurd as an hereditary mathematician, or an hereditary wise man; and as ridiculous as an hereditary poet laureate."


nielsm posted:

While programming theory is heavily bound to mathematics (many early computer science departments at universities were offshoots from the maths ones), the actual act of designing and writing software can really be closer to the arts, like composing music or painting.

Not really, because in the arts you're often forced to appreciate and have a knowledge of the history behind the art and culture. There is a memory hole in technology. Meanwhile Dabblers and Blowhards is a wonderful rant against pg's "I'mma painter but with s-expressions, honest".

quote:

Give it a shot, you might have it.

More accurately, give it a shot, you might enjoy it, and practice enough to be good at it.

Hard NOP Life posted:

People just spout poo poo that conforms to their views and selectively ignore everything else. I posit that the notion that programming is an innate ability strokes the egos of those that, so they ignore that redaction.

Just quoting this and moving on.

JawnV6 posted:

I wholeheartedly disagree with most of that post (programming is math, not art), but this bit in particular I'd like some clarification on:

unixbeard posted:

Also if you think code is art I suggest you go look at more art


Yes, computer science is mathematical, and yes, proofs and programs, but we can write poetry in english and legal contracts in english. The same is true for code, code is about communication, viz "Programs must be written for people to read, and only incidentally for machines to execute." and has all the opportunities other mediums have. Code is a opportunity to express design, art, engineering, as well as business logic.

It is not to say that programming is art, but you can create art using code. Just look at the screenshot thread some time (or if you like, MOMA, which has a collection of computer art).

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

Zhentar posted:

The retraction paper no more proves that there isn't a binary "getting it" than the original "proved" that there is.
This is not how the scientific method works. You don't have to prove the null hypothesis, you assume it's true until you find evidence otherwise.

Zhentar posted:

(and if you're trying to argue that there is no aptitude for programming at all, then I'd argue that you have a strong aptitude for being a dumbass)
Obviously there is such a thing as aptitude for programming, since we could train a person up in "quogramming" for five years, a discipline which would be eerily similar to the code monkeying we all know and hate, and upon their first CS101 class they'd fly. Thing is, the pre-exposure to relevant skills, knowledge and thought-processes that we shorthand as "aptitude" is so diverse that I doubt there is a simpler definitive test for programming than simply trying to teach students it (preferably several different ways) and seeing what sticks.

Which brings me on to

quote:

programming is math

quote:

programming is art

quote:

programming is X
Programming has components of all these things, but it's a lot of other things too. How many times have you heard "programming is expository writing"? Because for the vast majority of development work, communicating clearly is a far more important skill than being able to prove the irrationality of sqrt(2). How about "programming is management" or "programming is a craft"? There are nuggets of truth and useful analogies in all these statements, but each individually is misleadingly reductive.

I'm not saying that programming is impossible to describe or anything, I'm just saying if someone asks or is curious, don't boil it down to a one-liner out of laziness or a desire to turn a phrase. It's doing both them and yourself a disservice.

coffeetable fucked around with this message at 12:37 on Sep 12, 2013

Elderbean
Jun 10, 2013


So how would someone without a math background obtain the necessary skills? In two years I'll be a civilian again, so I want to prepare myself for school.

Seashell Salesman
Aug 4, 2005

Holy wow! That "Literally A Person" sure is a cool and good poster. He's smart and witty and he smells like a pure mountain stream. I posted in his thread and I got a FANCY NEW AVATAR!!!!

Elderbean posted:

So how would someone without a math background obtain the necessary skills? In two years I'll be a civilian again, so I want to prepare myself for school.

If the concern is that you'll arrive at school without the math background then two years is plenty of time to learn all the math you will need. Get intro books on algebra, calculus, and discrete mathematics.

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

Elderbean posted:

So how would someone without a math background obtain the necessary skills? In two years I'll be a civilian again, so I want to prepare myself for school.

Well, first you should work out just how valuable it'd be to you. There are two ways in which my maths education has helped me with programming. The first is as domain knowledge: sometimes I'll run across a mathematical problem that I was explicitly taught how to solve by my textbooks. How often this happens depends largely on where you're interests lie though, and I could imagine that many (possibly a majority of) very good programmers never have a use for anything more advanced than counting.

The second is as a thought process: by the end my maths undergrad of it I was far, far better at reasoning about abstract objects than I was when I started. Maths, being almost exclusively composed of abstract problems, is a great way to pick up these skills. But I don't think it's the only one. Spending several years solving any kind of problem that you can't rely on your intuition for would develop the same processes.

Having decided whether you want to learn maths as it's own subject or instead just learning what you need as you learn to program, the next questions are: how much maths do you know already? And: what's your preferred way of learning? (Textbooks/lectures/problem sets/etc)?

coffeetable fucked around with this message at 17:06 on Sep 12, 2013

Elderbean
Jun 10, 2013


coffeetable posted:

Having decided whether you want to learn maths as it's own subject or instead just learning what you need as you learn to program, the next questions are: how much maths do you know already? And: what's your preferred way of learning? (Textbooks/lectures/problem sets/etc)?


I haven't used anything beyond basic math in years; by the time I get out it will have been nine years since I graduated high school.

I don’t really have a preferred method of learning.

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
In that case, I'm going to make the mistake of assuming your methods of learning are similar to my own, and recommend Stroud's Engineering Mathematics. Your local library should have a copy (edition doesn't really matter). It starts with arithmetic and works its way up to multivariable calculus, and what makes it special is that it's self-contained and takes a very interactive approach: it walks you through an example of every single new concept it introduces, then gives you a few exercises on it:

(This is about the third page of the book).

Thermopyle
Jul 1, 2003

...the stupid are cocksure while the intelligent are full of doubt. —Bertrand Russell

Elderbean posted:

So how would someone without a math background obtain the necessary skills? In two years I'll be a civilian again, so I want to prepare myself for school.

A lot of programmers overemphasize formal math as a prerequisite for programming. Probably because the type of programming they do a lot of (or at least the type of programming they find interesting) requires math.

There's vast swaths of interesting (depending on your interests) programming projects that require very little knowledge of maths.

Seashell Salesman
Aug 4, 2005

Holy wow! That "Literally A Person" sure is a cool and good poster. He's smart and witty and he smells like a pure mountain stream. I posted in his thread and I got a FANCY NEW AVATAR!!!!
I took "prepare myself for school" to mean studying CS or something similar at university. I think what kind of study you are planning to do will determine what math fundamentals you need.

rjmccall
Sep 7, 2007

no worries friend
Fun Shoe
There is a somewhat dumb but nonetheless solid reason to have some math background before trying to learn programming: a lot of the lessons, assignments, and sample programs out there are centered on various problems from math, and if you don't know the problem, you'll find yourself trying to learn two things instead of one.

For example, almost everybody teaching recursion brings up the Fibonacci sequence at some point. If you don't already know (or have forgotten) the Fibonacci sequence, that example is not going to feel natural to you, and it's easy to lose track of what's going on when the professor plunges forward without justifying it.

double riveting
Jul 5, 2013

look at them go
Just make sure you know what the hell a function is, i.e. not a wiggly line and two axis'.
Apart from that the only math skill you're going to need as an absolute prerequisite is "don't be afraid to tackle hard problems". As in, don't give up because you don't know how to do it.

Otherwise try to find your high-school calculus and algebra books.

Elderbean
Jun 10, 2013


I’ve heard that some schools focus on math and theory, while others lean toward programming. Which schools should I be looking at?

I live outside of Seattle right now, I’d like to stay in the area if I can.

Elderbean fucked around with this message at 20:03 on Sep 14, 2013

Internet Janitor
May 17, 2008

"That isn't the appropriate trash receptacle."
I can't speak from personal experience, but the University of Washington is a large and well-respected university. Their CS department probably runs everything on Windows for obvious reasons, but I'd imagine they have plenty of funding.

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

Elderbean posted:

I’ve heard that some schools focus on math and theory, while others lean toward programming. Which schools should I be looking at?

I live outside of Seattle right now, I’d like to stay in the area if I can.
Most places list their courses and program requirements online nowadays. Check out the CS department websites for each uni you're looking at and see if you can construct a program you'd be happy with.

more like dICK
Feb 15, 2010

This is inevitable.
Are there any good plain C libraries for JSON? json-c is the one that keeps coming up in my searches.

double riveting
Jul 5, 2013

look at them go

more like dICK posted:

Are there any good plain C libraries for JSON? json-c is the one that keeps coming up in my searches.
JSON is so simple and context-free, you might just be well off typing the grammar into a parser generator of your choice.

ufarn
May 30, 2009
I get two errors from rvm, when I try to update my version of Ruby: an Xcode version error and a permission error.

Since my Xcode version is newer than the log suggests, and since I am logged in as the main admin account, I can't make sense of the error message.

The full message is available here with some added commands thrown in to highlight the problem.

wolffenstein
Aug 2, 2002
 
Pork Pro
Make sure you have the latest command line tools installed (Xcode Preferences > Downloads > Components), then run `brew doctor`. Otherwise read homebrew's troubleshooting wiki.

wolffenstein fucked around with this message at 16:02 on Sep 15, 2013

ufarn
May 30, 2009

wolffenstein posted:

Make sure you have the latest command line tools installed (Xcode Preferences > Downloads > Components), then run `brew doctor`. Otherwise read homebrew's troubleshooting wiki.
The CLI tools are up-to-date, and I tried the FAQ, but `brew doctor` shows a bunch of issues I don't know enough about OS X and CLI work to make sense of.

wolffenstein
Aug 2, 2002
 
Pork Pro
I missed the part where you said you were using RVM. You should ask the Ruby thread. You should also learn CLI.

wolffenstein fucked around with this message at 16:27 on Sep 15, 2013

Scaevolus
Apr 16, 2007

more like dICK posted:

Are there any good plain C libraries for JSON? json-c is the one that keeps coming up in my searches.

cJSON is very simple, and good enough to start with.

nvm, shrughes reminded me why it's not good

Scaevolus fucked around with this message at 05:26 on Sep 16, 2013

shrughes
Oct 11, 2008

(call/cc call/cc)
No, cJSON is ABSOLUTE poo poo DO NOT USE CJSON.

Jewel
May 2, 2009

Scaevolus posted:

cJSON is very simple, and good enough to start with.

nvm, shrughes reminded me why it's not good

shrughes posted:

No, cJSON is ABSOLUTE poo poo DO NOT USE CJSON.

I'm curious to the reasons so I know what to look out for in the future!

shrughes
Oct 11, 2008

(call/cc call/cc)
Adding elements to the end of an array takes linear time, adding attributes to an object takes linear time.

Numeric parsing gets the rounding incorrect.

Crazy logic with valueint and valuedouble fields.

An insane API, insane internal APIs, absurd coding style.

Printing a number has a buffer overflow:

code:
	str=(char*)cJSON_malloc(21);	/* 2^64+1 can be represented in 21 chars. */
if (str) sprintf(str,"%d",item->valueint);
(Complete noob source code using poo poo like sprintf.)

Vanadium
Jan 8, 2005

When is that gonna overflow?

Plorkyeran
Mar 22, 2007

To Escape The Shackles Of The Old Forums, We Must Reject The Tribal Negativity He Endorsed
A 21 character string needs 22 bytes.

Suspicious Dish
Sep 24, 2011

2020 is the year of linux on the desktop, bro
Fun Shoe
It doesn't outright say it (the comment is misleading and dumb), but the maximum representable integer value requires 20 characters to store, so 21 bytes.

shrughes
Oct 11, 2008

(call/cc call/cc)
(Negative integers use an extra character.)

Seashell Salesman
Aug 4, 2005

Holy wow! That "Literally A Person" sure is a cool and good poster. He's smart and witty and he smells like a pure mountain stream. I posted in his thread and I got a FANCY NEW AVATAR!!!!

shrughes posted:

(Negative integers use an extra character.)

That was my guess but it's been so long since I used the printf formatting I'd forgotten what %d did with negative numbers and was afraid to out myself as an idiot :v:

vvv upon actually checking the smallest 64 bit signed int you are correct, 19 digits + negative sign + end of string character = 21.

Seashell Salesman fucked around with this message at 00:20 on Sep 17, 2013

Suspicious Dish
Sep 24, 2011

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

shrughes posted:

(Negative integers use an extra character.)

The smallest 64-bit signed integer takes up 20 characters, including the negative sign. So unless you have some magical 65-bit signed integers, I'm not seeing the overflow.

PilotEvan
Jun 27, 2008

WHAT?
Okay I have a pretty specific question. Say you had a huge amount of data with a tree-like relationship, maybe for example a list of all species names (and their respective genera, families, etc.). And say you wanted to make queries like, "Output all children (and grandchildren and so on) of the class Mammalia" (or phylum Arthropoda or whatever the hell). What kind of data structure would you want for that? I'm completely inexperienced with hash tables but I'm pretty sure that's the right answer. A straight-up tree data structure seems like it might make traversing and outputting the data simpler/faster but after doing some research it looks like it might be better to do some kind of hash list or even a hash tree to have pointers(?) to a child's parents or adjacent siblings (assuming there is ordering between siblings) with an added bonus of finding the starting node I want to begin with in a reasonable amount time. If there aren't any changes made to the data set whatsoever it makes me think that some augmented hash table is probably the way to go but I'm still unsure. If hash tables do the trick I'm open for any book recommendations or other references that might put me on the right track. :)

Adbot
ADBOT LOVES YOU

Sinestro
Oct 31, 2010

The perfect day needs the perfect set of wheels.
You wouldn't want to grab all the data and then futz with it. Use a search algorithm to find the item you are starting from, then recurse over the children of the item.

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