[Boards: 3 / a / aco / adv / an / asp / b / biz / c / cgl / ck / cm / co / d / diy / e / fa / fit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mu / n / news / o / out / p / po / pol / qa / r / r9k / s / s4s / sci / soc / sp / t / tg / toy / trash / trv / tv / u / v / vg / vp / vr / w / wg / wsg / wsr / x / y ] [Home]
4chanarchives logo
Any robots here majoring in CompSci? I can't grasp my head
Images are sometimes not shown due to bandwidth/network limitations. Refreshing the page usually helps.

You are currently reading a thread in /r9k/ - ROBOT9001

Thread replies: 104
Thread images: 23
File: 3423.jpg (133 KB, 908x503) Image search: [Google]
3423.jpg
133 KB, 908x503
Any robots here majoring in CompSci? I can't grasp my head around certain things like properly implementing a binary search or when to use a vector instead of a array. Why was I born fucking stupid? Why wasn't I born Indian, gifted with superior intelligence from birth? I want to die and be reborn as a smart person.
>>
Sometimes it takes a while for things to click since comp sci is pretty abstract.

Vectors are better for loops because the iterator is built in, basically. Not that that really matters because iterators are trivial.

Binary search needs sorted data. Think of numbers 1-100. I pick a secret number and ask you to guess it.
You say is it between 50 and 100?
>yes
75-100?
>no
Etc.
You're halving the possible numbers of guesses each time.
>>
>not computer engineering
Enjoy your meme degree, OP.
>>
File: Asian-Robots.jpg (46 KB, 512x352) Image search: [Google]
Asian-Robots.jpg
46 KB, 512x352
>>27520858
No, I know how it works, but I'm average at math and can't process the algorithm. For instance, if the value at the index is lower than the target value, then the minimum boundary increases by 1(vice versa for the maximum boundary), then the sum of the minimum and maximum value are divided by 2 then used as the index for the next search. Who came up with that and how the hell did they figure that out? Then my professor starts going off about how algorithms more advanced than that are used to figure out how many starts are visible from Earth and shit. Am I going to have to make algorithms like that once I graduate and hopefully get a job? Jesus help me.

>>27520916
But I want to make games i Japan, Anon. Programmers are in demand there. If I get a programming job in Japan, I can get a 2/10 and have a few haafu kids, make my weeb fantasies a reality, and escape my shitty western life forever.
>>
>>27521259
No you only have to reproduce the algorithms or use them in clever ways for different types of searches. Writing an optimized original algorithm that would be used all over the world would be like a PhD thesis material.
>>
>>27521259
ok, so you're playing a guess the number game. i have a number from 1 to 100, pick it. how do you make a strategy to pick it in the least number of steps?
>>
>>27521365
That's my problem: I'm not clever. As with everything in my life, I do everything by the book. I feel lost if someone isn't telling me how something should be done and how to do it.
>>
are you actually thinking these things through

binary search is insanely easy to process once you've written out what actually happens on each iteration

maybe put some effort into it
>>
File: 5757.jpg (106 KB, 1192x696) Image search: [Google]
5757.jpg
106 KB, 1192x696
>>27521452
No, no, I understand. Its basically looking at the element in the middle of the two boundaries. Depending on the element at the index, it either returns true(or the index) if the target is at the index, or the minimum/maximum boundary value is increased/decreased, then their sum is divided by 2, thus producing the new "middle" index until the value is found. I get it. It's implementing the natural thought process someone would go through when prompted with a similar problem.

But if I had issues with something as simple as this, how am I going to handle binary trees? Or understanding code written by someone far more intelligent and clever than me? I can't even handle files, I've only worked with .txt files, which are easy as fuck to manipulate. Plus, tech is always advancing, look at fucking VR. If that shit takes off, coding for VR shit will become the new norm. I haven't even grasped the old norm. Pic related, I can't even make a word processor like Word. Shit. I'll be studying till the day I die.
>>
On one hand, clever algorithms are the stuff of the computer science classroom, but not as much the real world. And even then, the cleverest algorithm I'm aware of is the string pattern-match algorithm, which is where you have a string and you want to find all instances of it in a large text. The obvious algorithm requires time proportional to the product of the lengths of the pattern and the text, while the clever algorithm requires time proportional to the sum of the two lengths. (The second-cleverest I know is determining the lowest common ancestor of two nodes in a tree, for which there is a constant-time algorithm.) A lot of real world code, as I gather, is mainly about assembling the components you have available in the correct way. Developing totally new algorithms is a pretty niche thing, because mature software ecosystems (like Dotnet, Java, and Python) have libraries that solve most standard problems.

On the other, you probably have to LIKE programming to succeed. Or if not programming, you have to like math and logic puzzles. You have to be interested not in solving sudoku, but in understanding the processes one might follow to solve sudoku puzzles. Binary search in itself is just an implementation detail, and having trouble with one particular algorithm isn't an issue, but having trouble with algorithms in general is.

On the third, if you're just in it for the money and you have a lot of tolerance for bullshit, you may be able to stick it out regardless of interest. I'm not sure how I feel about this because I actually do like programming-in-itself and I don't have a lot of tolerance for bullshit.
>>
>>27521673
The only thing that makes VR different from any other game is the graphics and I/O. Game systems are coded mostly the same way. If you're doing graphics professionally, you'll have learned graphics techknowledgey already. That doesn't seem like your field, since you're bad at math. You'll find a place in your work, don't worry.

The technology doesn't change that fast. You'll be working on a lot of different problems, but when you're in a project, you'll be working in pretty much the same coding paradigm for years at a time. Plenty of time to figure it out. Not only that, but you'll be working full time in that paradigm. You'll quickly learn to navigate the documentation for whatever programming language that you're using, and at that point the language is fully within your grasp.

Real life dev isn't like a CS exam, you can go on wikipedia and look up the different algorithms if you need a refresher on how they work, or better yet, you can get the code from a package somewhere or copy paste it off of stackoverflow.

It's really not that hard. When you start, there will probably be a senior dev planning out all the project structure and you'll just be filling in the implementation of interfaces that the senior devs designed. All the thinking will be done already, you'll just be a code monkey.
>>
>>27521971
Oh, and VR shit is largely the same way, with one really fucking massive caveat. Game development software like Unity handles the linear algebra of VR---how to set up dual viewpoints, how to translate motion information into camera changes. The problem it doesn't solve is how to interact with a VR environment, and Unity can't solve that because nobody has solved it, but that's also why VR is dead on arrival.
>>
>>27521971
so first you can't understand binary search and now you're worrying about word processors and VR? dude
>>
File: costanza-chrissy-image.jpg (14 KB, 300x300) Image search: [Google]
costanza-chrissy-image.jpg
14 KB, 300x300
So since we're on the topic , I cant decide between economics and ComSci , I love both of these subjects , but is it true the steroetype that ComSci classes are full of autistic fucks ? I don't want to spend my college years in that awkward envinroment
>>
>>27521971
or you spend all day turning your interns' spaghetti code into components that will be assembled the right way at some point in the future.

or you spend all day writing spaghetti code because there is an investor demo tomorrow and everything has to appear like progress is being made to keep the money people interested.
>>
>>27522072
They're both spergy as shit. The drawback to economics is that it also attracts ultra-libertarian faggots.

>>27522078
Fair enough. I meant that, if one wanted to make a minimalist text editor, something like WPF will carry most of the water for you. You won't be doing your own font glyph rasterization and GPU draw calls. But your post is probably the bigger picture.
>>
>>27521259
>I want to maek gayme
Lmao, give up now. 95% of you people fail out. In all seriousness you better study hard if you can't grasp it. Get internships now.
>tfw making a comfy 3000 every 2 weeks this summer
>>
>>27522146
>tfw there is an investor demo literally tomorrow.
>>
>>27522161
>interns making gaems make 1500 a week
LOL gamedev interns do it for free, dude.
>>
File: demos.jpg (38 KB, 600x185) Image search: [Google]
demos.jpg
38 KB, 600x185
>>27522190
Sorry to hear that. My next serious deadline isn't until May, but it's a pretty harsh deadline.
>>
>>27522146
But economics has way more QT's right ?
>>
>>27522240
are you working for a startup? I am, and I only hear about demos like 2 days in advance. We keep a separate demo branch from our dev branch that we update from dev after certain milestones.

I don't think anybody knows what we'll be doing in May.
>>
>>27521971
I'm not gonna lie, I'm only in it for the money. Getting paid to sit in front of a computer all day is my dream. I mean, it's what I've been doing most of my life anyway. I'm totally fine with making Candy Crush clones till I'm dead.

>>27522014
I'm convinced I have some kind of mental disorder where I think and worry about different shit. But I ignore it by "manning up". I'll just keep studying. Wanted to vent for a bit since I don't know any programmers to be spoonfed from, (I only know a front-end developer that boasts about making 80k and does nothing but use stack exchange all day, shit really grinds my gears) and I've been stuck inside for eight months making shit with Ruby, Java, and C++. I don't remember the last time I showered or spoke to someone besides my mom. My diet consists of Little Ceasers and soymilk. I don't feel human anymore. I remember when I used to sincerely laugh.
>>
>>27522230
I know. I'm trying to tell him to do the game thing for fun, and find and interest in something useful.
>>27521259
Game devs legitimately overworked and underpaid because there are so many people that want to live out their childhood dreams.

>>27522269
More Stacys in econ. I've been chatting with this shy Asian qt. She's smart, and we always try to compete for best grade in the class. Also she has decent taste in anime and I see her at the gym.
>>
>>27522269
Ummmm well more women get economics degrees than computer science degrees (as a share of total degrees), but I doubt either of them attract too many QTs. It's been a while since I was an undergrad, but I remember most of the QTs pursue actual college of business majors like management and advertising.

>>27522319
I'm attending a conference in May, and I'm working to make a programming language (with the help of a friend) that I'd like to "unveil" then. (I'm giving talks about subjects relating to the language design, or rather, the theory behind the design.) So I'd like to have a compiler written by then, but I'm not quite satisfied with the language spec yet.
>>
>>27522001
>All the thinking will be done already, you'll just be a code monkey.

This doesn't make any sense to me. If it's really that easy to implement based off of some design, they would just use automatic code generation.

Also why does the average programmer get a demeaning name like "code monkey" while other professions do much more trivial work but don't get such demeaning names?
>>
>>27522492
Not that guy but computer science field is fucked up. IT too. So that's a good question I dunno why people demean it
>>
>>27522492
The problem with automatic code generation is, the challenge of programming is to impart one's intention onto the computer. Computers are not intentional ("semantic") machines, so they can't do that, and we're not able to create an abstraction over intention. It's like that silly Microsoft Nazi-bot: from a software perspective, it took string data and relayed and recombined it, but it "didn't know what it was saying" because that's not something computers do.
But I have no idea what's going on with the term "code monkey."
>>
>>27522492
Other professions aren't held to the same standards as programming. A programmer should always aim to push the medium, instead of letting it stagnate. Any real programmer would be their own boss, have their own company, and produce useful, never-before-seen, completely programs that benefit people or aid humanity. Like Mark Zuckerberg.
>>
>>27522421
sounds pretty cool. I'm writing a chrome extension with a startup company. We have a pretty big plan for it, but we have so much spaghetti code in our app, it's crazy. I'm the only non intern dev who isn't the senior dev, and i was an intern 2 months ago. I've been working on a refactor plan to make our code structure a lot faster and easier to unit test, and I'll be giving a presentation on it sometime to explain how it works to all the interns. Hopefully this design will be harder for the interns to break.

But, for the next couple of weeks, we'll be implementing the visual reskin put together by our graphic designer. Kind of sucks honestly, I would think that we should finish this current phase of optimization so we can move onto new features, but upper management wants to make our clunky performing barebones app look real sexy for investors rather than actually make some pushes forward on the development.
>>
>>27522565
Oh, and this is getting unbelievably far afield, but the "best" automatic code generation I've seen is in a language called Idris. It contains an embedded theorem-prover and uses something called the Curry-Howard isomorphism to, on one hand, construct an equivalence between types and formal proofs, and on the other, it uses the Hindley-Milner type inference system to get an equivalence between expressions and types. Because of this, Idris is sophisticated enough that it can sometimes generate code from type signatures (via posing the types-to-code problem as a theorem proof), but this capability is very limited and Idris is exactly as esoteric as it sounds.

>>27522603
Well, I'm an academic obviously, but even I know the value of good figures. My original background is computer graphics, so thankfully that's never been a problem.
>>
The modern high level languages we have now basically are code generation. Hardly anyone is going to make huge projects in C or Asm it's just too clunky for what usually amounts to a dB front end app. So people use Ruby and JS or Python. C++ has even become more modern with lambdas and smart pointers.

I don't think you even need to write basic known algorithms in most modern languages, they are usually 1 function in an import away.
>>
>>27522565
Pretty much all software written today falls under some kind of pattern unless it's a game or some never-before-seen sciency-mathy program. The future of every-day software development is code generation from conceptual models.
>>
>>27522681
>Pretty much all software written today falls under some kind of pattern
this makes no fucking sense
>>
>>27522696
No it doesn't. Think about it.
>>
>>27522327
>I'm only in it for the money. Getting paid to sit in front of a computer all day is my dream. I mean, it's what I've been doing most of my life anyway. I'm totally fine with making Candy Crush clones till I'm dead.
this is what i'd like to do as well but dont know which route to take. doesnt have to be games though. can be programming whatever as long as i can earn around 70-80k/year working normal hours
>>
>>27522681
The number of combinations of library functions is far too high. If someone has combined library functions in precisely the necessary way before, then there's no problem because the software to solve your problem is already out there. As far as "patterns" go, those are social conventions, which are also things that computers can't do. At the end of the day, you still have to know what you want the computer to do, and you have to know how to assemble the parts you have available in a way that'll make the computer do that. Libraries will do a lot of the grunt work for you, but that's not the same thing as not having programmers.
Anyway, I actually hate the idea of "design patterns," because they're a shitty substitute for language-level safety, e.g., explicit separation of pure and impure code. But that too is far afield, and it's sort of a poo-in-the-loo issue, since monads are a four-letter word.
>>
>>27522696
>ecommerce website
>enterprise software
>music app
>web crawler
>database system
>text processor
>photo editor
>toolbars
>widgets
>frameworks
>meme.js
>blah
>blah
>blah
>etc
>etc
>etc

your software is not original
>>
>>27522786
Just work for a fortune 500. I think I already told you I'm making 3000 every 2 weeks as an intern. They almost always offer full time positions if you do well.
>>
>>27522824
okay i would really enjoy hearing what you think the pattern is for enterprise software
>>
>>27522879
1. Import shit
2. Make GUI
3.???
4.Profit
>>
>>27522879
Obviously it's going to be too complicated for a post on 4chan and even if I did, you'd poke holes in it. But I would say that no enterprise software has done something radically different from others and all of them are different flavors and mashups of different (common) functionality.
>>
>>27522961
There's really one big hole in that definition, which is the extremely high dimension of mashups. So you'd need a system that allows you to specify what you want in excruciating detail, including what UI widgets you need and what functionality is attached to them and what kind of data you're working with and what kinds of transformations you want to apply to them and so on and so forth. For those keeping score at home, this is called programming.
>>
>>27523032
No, this is called design. The functionality has already been programmed a hundred times over.
>>
File: 1458171360506.jpg (77 KB, 580x618) Image search: [Google]
1458171360506.jpg
77 KB, 580x618
This comes up every so often, but I've been getting paid to write code for the past 10ish years at big companies, startups, and everything in the middle. Worked in basically every domain under the sun including commercial operating systems, compilers, new asic designs, networking system software, security, and a bunch of other stuff I'm not thinking about right now.

Happy to answer questions if you have any...
>>
>>27523082
my man you are insanely retarded but may i ask that you read sicp so that you too can be enlightened
>>
>>27523129
What is the highest salary you've had and the lowest?
>>
>>27523147
right, the prerequisite reading of every codemonkey writing enterprise software
/sarcasm

I wish programming were as pure as that book makes it out to be
>>
File: bu2_1104.jpg (874 KB, 800x1200) Image search: [Google]
bu2_1104.jpg
874 KB, 800x1200
>>27523129
What are the most important skills every programmer needs, and how does he/she develop them?

What are employers looking for in a potential candidate? Is having GitHub repositories filled with useful, interesting programs or a LinkedIn page useful?

What to do/not to do during an interview.

Will you be my mentor?
>>
>>27523155
Lowest was my first couple months on my first job where I was unpaid (>he does it for it for free).

I managed to graduate to the high high pay of 9/hr after those 2 months of unpaid work. It was working at a startup and I did a lot of nifty things like exploits, relaying back clickstream data, getting around firewalls, the like.

Highest is probably now, I get about 170k in base salary+80k in bonus, rsus, etc. I could push for more if I wanted, but I don't care enough at this point
>>
>>27523242
it has some useful information on the relationship between data and code that will undoubtedly come as a shock to >>27523082-kun
>>
>>27522645
OP here. What am I reading, and do I need to know this? If so, I'm screwed.
>>
File: 1442979733713.jpg (126 KB, 570x429) Image search: [Google]
1442979733713.jpg
126 KB, 570x429
>>27523246
>What are the most important skills every programmer needs, and how does he/she develop them?
There's a lot in general but the thing I would say most important is that you have to be able to think with absolute clarity. 'Fuzzy' thoughts and half-followed ideas usually just lead to shit code. That's why I think programming has a lot more to do with technical writing than math or something, because you're writing a guide for a literal idiot (the computer)

>What are employers looking for in a potential candidate? Is having GitHub repositories filled with useful, interesting programs or a LinkedIn page useful?
Beats me... if I had to go through an interview ringer now I'm sure I would get absolutely wrecked. Nowadays to switch jobs I just call an old colleague who works at another company then just come in and sign the papers. When I interview somebody, I just ask them a few questions about their resume, the last thing they worked on, and 3 (laughably easy) programming questions:
1) print the numbers from 1-100
2) delete an element from a singly-linked linked list
3) given a hashtable api (which I write on the board), solve this problem: "given a string, find the character with the most amount of occurrences"
Linkedin is definitely useful, very few people really care about github outside of 'cool he has a github'.

>What to do/not to do during an interview
There's a huge shit list of things you shouldn't do (curse, show up late, etc) that you can figure out if you just read a book here or there and take a few practice interviews. I would say though that you shouldn't get down if you don't get a job offer from a company, at the end of the day they are just dumb shmucks on the other end as well, so who cares if they hire you or not!

>Will you be my mentor?
I'm over 30 and still a hugless kissless virgin mate. Do you really want someone like me as a mentor?
>>
>>27523410
No, almost nobody knows that. I have a PhD in computer science and I only sometimes comprehend it. In a way, I only laid that out to say what code generation might look like, and hopefully what you take away is, code generation would be a total clusterfuck of abstractions that are far worse than just writing code.
In truth, I have a love-hate relationship with this sort of insane theory-mongering. It's interesting, but it's also very prone to losing the plot, to the point that some Idris proponents think it's a good thing to have programs not be Turing-complete. (A Turing-complete thing is something that's capable of performing any computational task. So something that's not Turing-complete is not capable of doing all possible computations. A thing you may learn in your degree program but probably won't appreciate is that infinite loops/infinite recursion are the things that separate computer science from math and logic.)
But more than anything else, the thing that I can't abide is wanton extrapolation of capability. We've made computers do X, so obviously they'll do Y which I think is similar to X because of an analogy. That's a cancerous blight on computer science, and I regularly see other CS PhDs doing that. Automatic code generation falls under that umbrella, so I take umbrage to it. But so do things like machine learning and computer vision, which are just as unlikely.
>>
File: 1394683579481.jpg (79 KB, 640x480) Image search: [Google]
1394683579481.jpg
79 KB, 640x480
>>27523560
I'm this guy >>27523129
and I'm actually a proponent of most things not being turing complete desu... reduces attack vectors, makes it easier to write better compilers, reduces bugs, things like that

Actually, on that last point about bugs... in real life it wouldn't matter if it were turing complete or not, people are 100% experts at making things shit
>>
>>27523546
>I'm over 30 and still a hugless kissless virgin mate. Do you really want someone like me as a mentor?

Yeah, sure. Also, I'm only five years younger than you, by the time I graduate, would I be discriminated against hiring-wise?

>>27523560
So, for now, code monkeys don't have to worry about automatic code generation taking their jerbs? And if computers aren't intentional machines, does that make AI an unrealistic concept?
>>
>>27520701
I started with compsci then switched to econ and now I'm thinking about switching to psych lol
>>
>>27523860
The problem with Turing-incompleteness is that you can't do IO. I think the better safety measure is to start from referential transparency, and think about how to apply similar concepts to stateful code. Yes people should be protected from themselves, but dependent typing isn't the answer. That said, I am looking in to compile-time invariants that don't sacrifice IO.

>>27523866
>does that make AI an unrealistic concept?
Yes.
>>
>>27520701
Not really as CS major but I'm a'ight at it. (Taking a data struct course)

So a Binary Search Tree is a simple way to organize data. Say we have some node "N" This node N can have two children. One child is greater than or equal to N, while the other child is less than N. So for example, if I give you the array [5,3,10], then 5 is N, 3 will be a left child of N since it is less than N, and 10 will be a right child because it is greater.

And that's it. If you think it is complicated, try just writing and constructing a tree. Don't worry about ANYTHING other than starting at the top, seing if it is less than or greater then, and going to the next node, and then checking again, and then going to the node, etc.

>How do I know when to use a vector or array?
It's something you learn just by doing a bunch of code. In general, if you need to do a bunch of bullshit to have an array work, you will probably get more out a vector.

I have an exam on red-black trees tomorrow and I'm gonna get fucked because I have just been looking up how to balance them lel.

You'll do fine though anon. It's something that comes with practice - not overnight.

Just make sure you keep your code clean, you use functions where you can to keep the code clean, and you can ALWAYS read what you wrote.
>>
>>27523546
Would you ever consider dating someone more than a decade younger than you
>>
>>27523941
Wait, wait, so you're saying that a binary search and a binary search tree are the same thing? I thought a binary search was an algorithm used to find a value in a data structure(without relying on a pre-built function), one of which is a binary tree? Unless you mean the "tree" is the way the algorithm traverses the data structure. I'm getting confused now.

Also, are matrices also just data structures meant to hold large amounts of data? If so, what is their purpose? Or is that something I'll encounter later on in my studies?

>>27523916
>>27523860
Sorry, I have one more question. Do I need to know how to apply Scrum? Or would knowing that be more for someone seeking a management position?
>>
>>27523129
Hey man, 2nd year CS student here. A question: has reading code always been easy for you? For some reason, I just really suck at reading code not written by me. Even simple things, like quicksort kind of fuck with my mind, and require me to think really deeply to understand. I just get so lost when tracing things, and keeping track of variables and that sort of thing. I always just get overwhelmed. To make an analogy, it feels like my brain has very little RAM.

Most of my classmates just seem to be able to glance at code C or Java and read it like they read English.

I went to a co-op interview about a month ago and they asked me debug a small program. I just sat there trying to digest all the nested loops and recursion for like 10 minutes and... nothing. I felt so fucking stupid. For me, if I can't run the code, I can't debug it.

How do I overcome this? I've been programming for a good 2 years now and I still suck at reading code.
>>
If anyone has programming questions or assignments for me
[email protected]
I'm NEET and I need things to do. Seriously.
As for you op a vector is an array with some (presuming) C++ standard implemented functions.

Basically there's no use for an array unless you're using it for syntax reasons. (instead of writing a, b, c... You write arr[n] and write your code that way. Less declarations)
Also I'd avoid making your own low level datatype's with vector. Writing a vector class or adding vector functionality internally to your class functions isn't hard. If you find yourself using stuff like sorts or inserts it a lot you can easily switch to a vector either way.

I'm sure everything will start to make sense when you get a better understanding of what computers are. I pimp Data oriented design for that reason alone. It's a good thing for everyone but newbies need to know that stuff to make sense of what they're doing.
>>
>>27524223
I didn't make the post about binary search trees, but...
In entry-level CS courses, you learn "binary search" as a technique for playing the "guess a number between 1 and 100 game." There's three important details about the number-guessing game that may not be obvious: first, that numbers are well-ordered (one is less than two which is less than three); second, that these numbers have even spacing (the distance from one to two is the same as the distance from two to three); and third, that you can easily compute the midpoint of the range. All these facts are necessary to make the number-guessing game work out with the algorithm that you're learning.
General problems can't work like this. For example, say I tell you "I'm thinking of a word that's present in the sentence 'the quick brown fox jumped over the lazy dog,' guess which one I'm thinking of." You can't directly apply binary search to that. But you could put the words into dictionary order---"brown dog fox jumped lazy over quick the"---and then you could ask "is the word you're thinking of 'jumped,' and if not, would it appear before or after it in the dictionary?" And now you can see we've retooled the problem into binary search.
Binary search trees are just a formal data structure for doing exactly this, so the two are related but not identical.
>>
>>27524279
Gotcha, I'll be in touch.
>>
File: 1432412286975.gif (932 KB, 258x258) Image search: [Google]
1432412286975.gif
932 KB, 258x258
>>27524276
>it feels like my brain has very little RAM.
same
also i recently discovered that when i was a kid i had to do a iq test and see a speech therapist, they said i had bad memory span
i think its still the case

im in my first year of CS
>>
>>27520701
>Why wasn't I born Indian, gifted with superior intelligence from birth?
Indians are the fucking cancer of the IT industry in the developed world.
>>
>>27520701
>Indian
They write shit tier code if outsourcing results are to be judged. Usually takes more work to fix what they're doing than doing it yourself.
>>
File: 8uwnCKI.jpg (494 KB, 953x1280) Image search: [Google]
8uwnCKI.jpg
494 KB, 953x1280
>>27523916
Yeah working with IO (or just managing state in general) w/o turing completedness is impossible. But theres still a big class of programs that would benefit from removing some amount of turing completedness... I think. Actually, the more I think about it, the dumber it sounds. So I might have to retrace my half hearted opinion :o

>>27524223
No worries mate, go ahead with w/e questions you want. Scrum is basically never 'actually' followed in the industry, its just something managers say they're doing to let everyone know that they're hip and with it. If you read the wikipedia articles on those things and get the general idea, then that's more than enough

>>27524276
No, reading code actually used to be super outrageously hard for me. BUT if you get good at reading code the rest of your life gets much easier, because 90% of real working life is reading someone else's crap, massaging what you wrote into something that can work with it, and hoping nothing breaks.
How do you get good at reading code? Honestly.. it is deliberate practice. I used to work at a very big company that had monolithic codebase of over 500 million LoC (checking out the code would take like 30 mins) and the only way I could wrap my head around it was to document the program flow on paper, by writing it out. The first couple of times you will suck at it, but after awhile it will get much much easier. After awhile I just started writing scripts that did this for me, and then I got good enough that I could just keep it all in my head. But, the entire process took around 4ish years, so it's not something that happens over night.
>>
File: 1454303817797.jpg (140 KB, 500x454) Image search: [Google]
1454303817797.jpg
140 KB, 500x454
>>27524276
Also I think it's common to feel overwhelmed at school. Like, when i took a comp arch class in college I remember taking my last final and thinking 'man did I actually learn anything in this class? I felt lost the entire time'. 3 years later I was working on my own circuit design and writing bring up code, basically using all those concepts that I only half learned in class, only now I actually sorta understood it. It's not a race and if you keep at it you'll probably figure it out. You overestimate what you'll learn in 1 year, but underestimate what you'll learn in 3 years, so don't get too disheartened

>>27523982
I wouldn't mind the age difference... but realistically I'm an old man and not exactly prime material here. Someone 10 years younger than me probably has a lot of better options
>>
>>27524594
>Actually, the more I think about it, the dumber it sounds.
It's probably worth talking about how this happened in the first place. Dependent typing is an idea at the bleeding edge of functional programming, which involves taking the idea of "phantom types" to the Nth degree. The thought is, if we made a type of lists that encode their length as part of their type, in other words we have a "type of lists of length 3," which is distinct from a "type of lists of length 2," then we can do a bunch of crazy invariant-checking. For example, I could make a list-lookup function that can statically check whether the index you want is out of bounds, and that'll reject programs that try to do invalid lookups.
So that's fan-fucking-tastic on paper, but in practice it means that your list and your index have to be known at compile-time, so this only works on literal lists and indexes. Hence the loss of Turing-completeness and the inability to cope with IO.
The idea I'm toying with is something more like, you can do a runtime-cast to something like a "type of nonempty lists," then if you want to get the head element, you never have to check whether the list is empty because your list's type contains that assurance. But the trade-off is that casting to the type of nonempty lists will fail if your list is empty---it's still a runtime check that can produce an error, but you only have to do it once, and you do it in a controlled situation, and then the types carry the information forward. Which is really more like try/catch to the Nth degree.
>>
>>27523261
Holy shit man, nice
>>
>>27523261
What do you reccomend to a soon to be first year CS student?
>>
Any computer engineers here? What is it like?
I'm currently deciding between CE, EE and something called Computer Systems Engineering

Also between deciding to study on Mexico (where I currently live) or 'Merica (legally).
>>
File: 1459005471203.gif (2 MB, 450x450) Image search: [Google]
1459005471203.gif
2 MB, 450x450
>>27524836
You can come to America, but make sure you come here legally.
>>
> tfw spend years studying programming on my own, mastering several programming languages, writing compilers, 3d renderers, emulators, etc.
> sheer fascination at how things work kept me going for so long

> get a job
> write java and python code when i'm lucky
> spend all day in meetings when i'm not
> no more motivation to work on cool stuff I used to program outside of work
>>
File: 1458121661009.jpg (20 KB, 200x200) Image search: [Google]
1458121661009.jpg
20 KB, 200x200
I'm a junior in college right now and I'm so fucking tired of coding or any coding related thing holy shit

I started coding by myself when I was 11 but just three years of college made me hate it forever.

Doesn't help that I feel extremely unskilled compared to people around me. Haven't gotten an internship because I'm pretty sure I'd fuck everything up and be laughed out of any interview.
>>
>born to early to explore the galaxy

>born to late to explore the earth

>born just in time to experience the glorious waifu age

https://www.youtube.com/watch?v=DnzCzV9Dnvs [Embed]
>>
>>27524594
> Yeah working with IO (or just managing state in general) w/o turing completedness is impossible.

State is completely possible in a non turing-complete language.
>>
>>27525202
In fact, you can have both.
Just having state and i/o, without say, loops/functions/jumps, does not allow you to compute recursive functions, so they do not preclude turing completeness.
>>
File: 1428025708938.jpg (18 KB, 450x374) Image search: [Google]
1428025708938.jpg
18 KB, 450x374
>>27524732
Kind of a cool idea... but I don't know where I'd take it... this is why I'm not a PL guy. Any ideas outside of nonempty lists where you'd do both RTTI and compile time checks??
However What you're describing as 'dependent' types I've seen shades of in languages like Ada, or HDLs like verilog before, but they aren't as fleshed out. Ada especially allows you to define ranges and stuff in your derived types. Before protobufs was a thing I've seen IDLs written in Ada that do neat things with this language feature, but I've also seen people work to get around that...

>>27524830
Work hard and give an honest effort, but don't sweat it too much... Also take as many classes in as much stuff as you can. Learning is a pleasure in of itself that gets harder to do as you get older
>>
>>27525266
You do run into trouble that IO generally requires partial functions, because of the possibility of getting invalid input (or generating invalid output). Furthermore, processing data from an IO source requires general (unbounded) recursion. For the most trivial example, if you have a data stream coming in, you can't know whether it'll ever stop.
>>
File: 1391323143146.jpg (40 KB, 500x314) Image search: [Google]
1391323143146.jpg
40 KB, 500x314
>>27525202
>>27525266
Ah.. not impossible as in "can't be done", but more like "life is too short to deal with this".

That being said are there some non turing complete languages with cool constructs that let you manage state+IO? I'd be interested in checking them out..
>>
>>27525287

>>27524997, >>27525202 here

basically all of these ideas came around when mathematicians wanted to be able to formally prove their ideas with programs. It started with ML in the early 70s.

>>27525346
Input could be a problem, but very basic stuff would be ok, i.e. reading if a gamepad key is pressed by checking some i/o register state

>>27525358
I was just thinking hypothetically.
>>
>>27525403
Polling a gamepad key implies unbounded recursion as well. It's possible to construct programs that are (informally) safe, but it's quite another thing to prove it. This is why I consider that a dangerous road to go down, because once you commit to proving correctness, you can't do things that seem reasonable, only things that are provably reasonable.
>>
File: 1455706057021.jpg (177 KB, 600x640) Image search: [Google]
1455706057021.jpg
177 KB, 600x640
>you don't need to know that much maths to be in CS!

Why do normies believe this?
>>
>>27525457
> Polling a gamepad key implies unbounded recursion as well.
A single read of an i/o register? I don't see how.
>>
>>27525287
>Any ideas outside of nonempty lists where you'd do both RTTI and compile time checks??
Not especially. It seems like there could be something really important here, but I'm too in-the-weeds to find it. Hence I think what's important today is making a language that supports exploring these questions.
I mean, a somewhat glib answer is, any time you have a try/catch block, you could replace that with a typed pre-check. But is that a good idea? Maybe! And maybe not.
>>
File: 4235126126.jpg (41 KB, 600x600) Image search: [Google]
4235126126.jpg
41 KB, 600x600
>>27520701

Yeah, it caused me extreme pain and I am now a drop out. I fell for the meme and it consumed me. I lost all of my friends, I wasted 4 years of my life and on classes I don't even remember, and I'm thousands in debt.

Never again.
>>
>>27525512
You're only going to check it once ever? That's not a very exciting program. In any case, I'm not denying that there are some situations in which Turing-incompleteness is fine. My position is, those situations are so narrow as to not be worth developing a programming paradigm/language. And furthermore, the compiler/interpreter of such a language must itself be Turing-complete, so it's not clear what you've accomplished with this gambit.
>>
File: 5343423545434.jpg (96 KB, 1118x636) Image search: [Google]
5343423545434.jpg
96 KB, 1118x636
>>27525545
But Anon, think of the possibilities. Don't you want a real waifu?
>>
File: 0daa9fc0.jpg (13 KB, 270x257) Image search: [Google]
0daa9fc0.jpg
13 KB, 270x257
>>27525287 here

>>27525596
What if you separated out the turing-incompletedness program out? Like something of the following sort:

while True:
input<-poll(stream)
my_turing_incomplete_program(input)

Where all possible values of input are known

This is sorta like what monads are like right now, and you can separate the pure/unpure parts, or in this case turing complete/incomplete parts. Even when writing code for dsps, I tend to follow this flow

In this sort of flow, now where are the applications of turing-incomplete languages? That's an answer I'd be interested in... my gut feeling tells me that there must be something because it 'sounds useful', but not sure what
>>
>>27525596
Actually, compilers are one kind of interesting program that definitely does not need turing-completeness. Interpreters, on the other hand, do.
>>
>>27525778
Small correction, interpreters of a turing-complete language need turing-completeness. Compilers of a turing-complete language do not.
>>
File: 1393752421830.jpg (24 KB, 293x208) Image search: [Google]
1393752421830.jpg
24 KB, 293x208
>>27525778
Yeah, there we go. Things like any memoryless systems, combinatorial digital logic, automata, etc. Non turing complete DSLs to explore these sort of things would be pretty interesting, I'd imagine
>>
>>27525778
As long as you take parsing for granted, and have a T-incomplete type system, and forbid metaprogramming. But general string parsing from an IO source will always imply T-completeness.

>>27525736
That's dependent typing. You might consider learning Idris.
>>
>>27520701
Vectors are a depreciated class I believe, always use arrays now.

Also if you are having trouble with search/sorting algorithms there are many websites with visual representations to help non-textual learners.

>>27521259
>Am I going to have to make algorithms like that
Unless you are in research as a PhD, probably not anon. You will be using existing algorithms in different ways to achieve a solution.

>I want to make games in Japan
I have a similar dream, just realize you get paid the equivalent of 40k USD on average there, while in USA its around 80k. Could always just sugar daddy some one.
>>
File: 1458374097193.jpg (90 KB, 900x675) Image search: [Google]
1458374097193.jpg
90 KB, 900x675
>>27525287
What is the most common technical interview questions you have encountered, or any other information on successfully passing an interview?

I'm graduating with a Software Engineering degree in 1 month and am scared of the tests they make you do because I panic under pressure.
>>
>>27525885
I feel like such a pedant with these responses, but technically, context-free languages are not turing-complete. You are correct though, the compiler cannot do as much fancy stuff :^)

>>27525867
Yep yep. I love my unbounded recursion as much as anyone else, but you can get some good mileage out of restricted systems like this.
>>
>>27525908
A 40k difference is fine by me, as long as I get to play games and watch anime as soon as they get released (and meido cafes), rather than make more money and having nothing to look forward to after work. Plus, I sense a civil war on the horizon here in the States, best if I get the fuck out while I can.
>>
>>27525963
I'm scared of whiteboards. Having to explain my thought process to strangers with my livelihood on the line might cause me to concuss.
>>
File: 1403212752_rus_gisa.jpg (70 KB, 469x700) Image search: [Google]
1403212752_rus_gisa.jpg
70 KB, 469x700
>>27525963
>>27526131
There is a book you can buy from this insufferable woman called "Cracking the Coding Interview". If you get through it you can ace about 90% of interviews out there. My advice is to go buy this book and do at least 5 problems from each chapter standing up on a white board, so you don't have to worry about it
>>
>>27526186
Appreciate the advice, I think I'll do just that.

Also one last question, how do you go from being a Software Engineer making 65k a year to one making 170k.

Should I be practicing certain API's or frameworks in my spare time to increase my desireability? Or is it simply over time with more experience you are worth more?

And one lassttt question, how important are Cover Letters? I've been skipping out on them 90% of my applications because I find it hard to come up with one for every job.
>>
>>27526238
I don't even know what to put in my cover letters without sounding cheesy/cliche as fuck. I may as well put "I'll suck your dick" in big, bold letters.
Thread replies: 104
Thread images: 23

banner
banner
[Boards: 3 / a / aco / adv / an / asp / b / biz / c / cgl / ck / cm / co / d / diy / e / fa / fit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mu / n / news / o / out / p / po / pol / qa / r / r9k / s / s4s / sci / soc / sp / t / tg / toy / trash / trv / tv / u / v / vg / vp / vr / w / wg / wsg / wsr / x / y] [Home]

All trademarks and copyrights on this page are owned by their respective parties. Images uploaded are the responsibility of the Poster. Comments are owned by the Poster.
If a post contains personal/copyrighted/illegal content you can contact me at [email protected] with that post and thread number and it will be removed as soon as possible.
DMCA Content Takedown via dmca.com
All images are hosted on imgur.com, send takedown notices to them.
This is a 4chan archive - all of the content originated from them. If you need IP information for a Poster - you need to contact them. This website shows only archived content.