[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
Programming Thread
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: 72
Thread images: 10
File: 1389741470051.png (283 KB, 623x469) Image search: [Google]
1389741470051.png
283 KB, 623x469
I saw someone asking, so I figured I would answer some of your questions

I've been getting paid to program for the past 10 years or so. Have worked on a lot of interesting things, stuff like computer security, operating systems, high performance supercomputer software, my own circuit designs and hardware among other things.

So... if you have any questions go ahead, I'm not doing anything tonight anyways
>>
>>27916836
List every book you've ever read on the subject
>>
>>27916836
How feasible is it for someone with no professional experience to work from home? I've been thinking of getting back into coding. Choice of language isn't a problem, would just need to know what I should focus on at first.
>>
>>27916836
how hard is it to get a decent (50k/yr) job?
I failed to get a BS major but I can get a minor and if I take 2 more classes I can get a BA CS major does that look good to employers?
>>
>>27916836
>>27916836
>>27916836
>>27916836

HOW DO I HACK? CAN YOU TEACH ME?
>>
>>27916836
How does a layman start?
>>
Can you explain the resize operation of dynamic memory in C++? I have a project to hand in and I have no idea what or how to do it.
>>
Have you seen that show mr.robot?

What he does, where do you think he started? Like what classes would you say he took his first semester of college.

If you havent seen the show he does things in I.think its called msdos??

Asking for a friend
>>
Is it possible for you to look at a video game's source code and understand how it works?

I know nothing about programming, so I've always wondered if that was how it worked. Like, if you knew the language, could you just read through the source code and understand it?
>>
File: 1458020893284.jpg (231 KB, 1440x1375) Image search: [Google]
1458020893284.jpg
231 KB, 1440x1375
>>27916854
Like end to end, cover to cover? Or would you also like the one's I've read half way through before I realized that they were worthless?

>>27916878
This is nontrivial to do even with professional experience. I think you could likely do some volunteer work as a way to start up and then try to segue into a paid position after that.

>>27916880
Not that difficult, even the most dead end job will pay in the 50-60k range. BA/BS doesn't matter, nobody cares about that.

>>27916905
Depends on what you want to hack... I would focus on that part first, and then figure it out along the way. There's no magic bullet to getting good at reverse engineering

>>27916912
www.codeacademy.com works wonders IMO

>>27916925
I'm not sure what exactly you're looking for here? If you have a container of n elements and want one of m elements, resize(container, m) will just resize what you currently have to m. Do you want to implement your own resize? Explain what happens at an OS level? Want me to explain what happens in the hardware?
>>
>>27917057
>This is nontrivial to do even with professional experience. I think you could likely do some volunteer work as a way to start up and then try to segue into a paid position after that.
Cool, thanks for that. I'll see what's available. Have a good night man.
>>
File: 1425536753146.jpg (217 KB, 667x1000) Image search: [Google]
1425536753146.jpg
217 KB, 667x1000
>>27916986
I have literally no idea what you're talking about... I'm sorry :(

>>27917016
Diving into source code and understanding whats going on is a nontrivial, but gets a lot easier with practice. These days I don't have that much trouble doing it, but video game engines are notorious for having lots of bad code and tricky parts. This website goes into detail about a lot of game engines and is one of my favorite websites about the topic:
http://fabiensanglard.net/

It's explained in such a way that if you understand a little programming you can probably follow...
>>
>>27917016
If code is written well you should be able to read but the problem is that games are generally fucking massive so you would have to read a lot before you started grasping what does what.

You can find little python text adventures and read the source code. You can see the classes for players, you can see the randomized damage, etc. Everything scales up from there.

The executable you get in commercial games isn't source code though.

>>27917057
Tell the ones you thought were worthless
>>
What kind of work do you do OP?
Libraries or consumer/company products. What language(s)?
Do you feel the shift towards performance over OOP memes?

Would you consider CppCMS (Cpp Web-dev framework) to be a good idea? I don't want to be behind the curve and people say PHP and RoR is 2005 shit.

I really don't know what to learn. I don't even know what back-end webdev is like. I can imagine it's very similar to most back-end programming. But if it is I don't see why there's a divide at all..
>>27917016
You can.
https://github.com/ecbambrick/ThrustVector
If I look at something like this I can look at the main.lua file. It's pretty self-explanatory usually. Functions like love.load() (initializing functions) are very good for understanding game systems usually. In bigger project they may be harder to find because you have a less direct connection to the game code than a small project like this. But it does take reading source code quite a bit to get a good knack for it.
I'd say the biggest issue is that a program can be structured in so many ways. Looking at the way things are initialized often suggests the general picture of how data is stored, that tells you a lot. For instance in this small game the initializing function only has 3 objects, the world, the player, the goal and the spawner. So if I wanted to know where the missiles are coming from and how they're placed I'd look at the spawner most likely.
>>27917057
>codeacademy
Disagree. It's for kids. It's far better to pick up some teaching materials and work with that. Code academy just teaches you the effects of the code you write. It doesn't promote the kind of understanding that allows you to work on things yourself.
>>
File: 1450447264924.gif (2 MB, 480x270) Image search: [Google]
1450447264924.gif
2 MB, 480x270
>>27916836
Mechanical engineer here. This is pretty handy, since I have a problem. Let's say I have a few million 16-bit floating point numbers. What's the quickest way to sort them?
>>
>>27916986
not OP, but I can answer (CS BA senior at decent uni)

Probably some sort of programming introduction, but chances are that if Elliot was a real person, he'd have been programming for a long while.

If you're asking how to get into stuff like that, learn programming basics, then get into security/pen testing.

He uses a shell, probably bash. I dont remember though. It's definitely not MS-DOS though
>>
>>27917242
Not OP.

Pick a sorting algorithm that allows you to do multithreading. So basically some sort of merge sort it.

If the sort has to happen rarely and you don't care that much about performance
https://en.wikipedia.org/wiki/Bitonic_sorter
is very consistent and easy to implement even. It does require quite a bit of memory though.
Timsort is also good. It's in-place so it doesn't have those issues.

With a GPU or a specialized processor you will be blasting through those numbers in no time.
>>
>>27916836
What did you major in? I enjoy systems level stuff and I'm going for a degree in CS, but it's been hard finding internships in that area from my experience.
>>
>>27917140
>Disagree. It's for kids. It's far better to pick up some teaching materials and work with that. Code academy just teaches you the effects of the code you write. It doesn't promote the kind of understanding that allows you to work on things yourself.

What materials would you recommend for a noob such as myself? I don't mind teaching myself, and wouldn't mind getting a job in this once I become good enough at it.
>>
File: 1403212694_rus_gisl.jpg (115 KB, 700x674) Image search: [Google]
1403212694_rus_gisl.jpg
115 KB, 700x674
>>27917140
>What kind of work do you do OP?
I don't want to be super specific, but I work on big iron networking stuff. There is a good chance that the packets got to your pc through some code I wrote. Last project I worked on a custom asic design (wrote the security bit in verilog), implemented the microcode, wrote part of the kernel driver, and wrote a bunch of system software that uses it.
>What language(s)?
These days C, C++, with a dash of assembly. Almost all scripts through python. Nothing special to be honest
>Do you feel the shift towards performance over OOP memes?
I wouldn't say OOP and performance are mutually exclusive... just look at every game engine ever. I don't actually mind OOP, there are domains where its very useful, like I'd hate to use a non OOP GUI widget library. I'm much more of a 'use the appropriate tool for the job' kind of guy.
>Would you consider CppCMS (Cpp Web-dev framework) to be a good idea? I don't want to be behind the curve and people say PHP and RoR is 2005 shit.
Sure, if you like C++. Modern Cx11 is almost a decent language. Honestly just pick up any old backend framework and you'll realize quickly that they are all almost exactly the same. Nowadays people like to do just basic things from the servers. They use what they call REST APIs (which in webdev land means you get a URL and it returns a JSON file with some data inside of it). The javascript frontend code takes this JSON and just renders it. This pattern is what most SPAs (single page applications) use, and the backend work is called a 'microservices'. If you move more functionality into the backend you end up with the 2005 era situation. Honestly, it's all the same shit once you realize what's going on.
>>
File: 9reTtso.jpg (61 KB, 482x500) Image search: [Google]
9reTtso.jpg
61 KB, 482x500
>>27917242
>>27917402
Don't listen to this guy he is super engineering the problem.

A sort for few million 16 bit floating point numbers is nothing, that's just 2 gigabytes. Just read it into a python script and let it do it for you.

If you're really picky write a c program to mmap the file and use some off the shelf radix sort library (you only have a range of 2^16). Even this is super overkill.
>>
>>27916836
Do you know assembly programming? I need help with an SNES rom hack I'm making.
>>
File: 1392131596978.png (75 KB, 950x450) Image search: [Google]
1392131596978.png
75 KB, 950x450
>>27917126
>Tell the ones you thought were worthless
A couple of worthless books:
-The compiler dragon book
-The classic OS book with the dinosaurs on it
-Every 'software engineering' book outside of peopleware and mythical man month (which are really just project post mortems)
-Code complete series

Couple books I found incredibly useful:
-A pattern language (not a book about programming, actually about architecture but incredibly inspiring)
-SICP, although it gets a lot of hype its a really excellent book+course
-Effective C++ (yeah totally worth a read)
-Architecture of Open Source Applications (free online!)

>>27917454
>What did you major in? I enjoy systems level stuff and I'm going for a degree in CS, but it's been hard finding internships in that area from my experience.
I got a degree in EE and CS, and did my minor in rhetoric (which is like comparative literature). Getting an internship where you do systems work is definitely a little harder... the easiest way is to ask around and see if anyone in your social circle works at one of those places. Also places like linkedin honestly help quite a bit, so don't' be afraid to spam the recruiters..
>>
>>27917505
Depends on what you want to learn.

I codeacademy is obviously better than nothing. But there's so many good resources.
http://learnpythonthehardway.org/
For instance.. I think maybe the first 10 pages are a bit much. Who really needs to print that much stuff to get the idea of printing? Regardless it does quickly teach you ideas in programming and does a fairly good job of explaining. But it doesn't teach you how computers work. Which is fine. That's not Pythons goal. Its high level.
>>27917513
>I wouldn't say OOP and performance are mutually exclusive.
Well depends on your standard for performance. Most projects compromise between OOP and performance. But I won't nag
Mike Acton has a very nice talk about it though
https://www.youtube.com/watch?v=rX0ItVEVjHc
And I'm sure you see where data oriented design and OOP conflict.

>>27917555
Well I did suggest an algorithm that's piss easy to implement and it scales if he requires more performance. He wouldn't really be asking if he just needed to output them once right? He could do that with almost anything.
>>27917673
>The compiler dragon book
Well it's good for an introduction to compilers. Sure, it doesn't teach you the new stuff in optimization etc but its a nice overview. Far from worthless. I don't know what replaces it now i suppose.. Not the kind of programming he's looking for I'd imagine.
>>
>>27916836
I've been trying to learn some networking so I've been reading a few texts on the subject, they all start with the OSI model and start talking about abstract layers but doesn't explain what that is. What is an "abstract layer" in the simplest terms?
>>
>>27917673
Do you have an MS or PhD in EE or CS? Sorry if the question is too personal.
>>
Cisco or Juniper?

Apple or FBI?
>>
>>27917789
I've done some networking and the entire OSI model is an abstract layer. As is the 1-7 layers.

I don't know any other use of abstract layers in that context.
>>
>>27917717
>http://learnpythonthehardway.org/
Sure, I'll give it a go. I'm one of those annoying people that gets good at anything they try so I'm sure it'll be alright.

Cheers.
>>
okay OP
how does I get into security? Opsec, infosec, netsec, all that shit.
I've read most of 'Hacking the art of exploitation' but I don't know how I'd go about finding vulnerabilities in a target, or even how to get past a login prompt in some server.
Perhaps I need to learn about web application hacking to get any kind of attack surface?
>>
>>27916836
How could I host a website? ( ie: a small imageboard or low maintenance web 1.0 designed site ).
>>
>>27917789
not OP but
when your pc connects with a remote host, everything between your application (your client) and theirs (the server) is abstracted out. You merely have an interface consisting in sock() send() recv() and so on.
likewise, the software in charge of the tcp doesn't have to worry about whether your pc is in your LAN or if it's on the other side of the world or even if you're using tor.
And the IP layer doesn't have to worry about how your ISP routes your packets, and the datalink layer doesn't have to worry whether you're using wireless, wired, or anything.
So they're all abstractions to the higher layers, which are clients to the lower layers.
And they're abstract themselves because they're a model.
>>
>>27918020
Install apache on a computer (yes your desktop works). Set it up according to one of their guides.
Get a domain name.
Put up your website.
Done.
>>
File: 1392690998404.jpg (85 KB, 765x1044) Image search: [Google]
1392690998404.jpg
85 KB, 765x1044
>>27917717
>And I'm sure you see where data oriented design and OOP conflict.
I've never worked on a game engine... but I liked over the slides and the type of transformation he showed are common in other domains. For example, when programming DSPs for voice work my first pass would likely be the 'data-oriented' way rather than the 'code-oriented' way. The way I like to think about it is that code is for 'scripting the hardware' rather than for existing in of itself. Still thanks for the great talk, I'll look at the rest later.

>>27917820
>Do you have an MS or PhD in EE or CS?
Neither... I just have a bachelors

>>27917826
I won't be specific but one of the products I worked on is in that picture, so take a guess

>>27917897
>how does I get into security? Opsec, infosec, netsec, all that shit.
Honestly I got into it due to customer issues at my job. There is a ton of people attacking our products in malicious ways even to the point of soldering on custom hardware then reselling it. Reverse engineering it became my job. I don't know what the 'traditional' path of getting into infosec is, but I'd imagine you start off as a pentester then work your way up
>but I don't know how I'd go about finding vulnerabilities in a target, or even how to get past a login prompt in some server.
This is a good question and I honestly don't have a lot of advice to give other than 'it comes with experience'. I would try to hack something relatively simple (like a child's toy) which tend to have weakly gaurded jtag pings and are easy to get a romdump off of.
For web application hacking, trying strange inputs and seeing what sort of HTTP request/responses you get, and monitoring network traffic is a good way to start. Get familiar with using something like curl, wireshark, etc.

>>27918020
If you're adventurous, use something like digital ocean and do it yourself. If you're lazy, just use wordpress and buy a domain from one of the regular handlers (name.com etc).
>>
will linux finally achieve desktop of the year?
>>
>>27918384
Linux will never have its desktop boom unless developers encourage it and there's some marketing efforts.
Also most likely there should be more probing on normals for what they're currently lacking in an os. I'm not saying you take their advice but you look at what they're having trouble with and you solve it.
>>
>>27917513
Let's write an operating system, OP.
>>
just go to >>>/g/ you fucking niggers
>>
>>27918479
>waah my general topics board is invaded by a general topic
Go cry in a fembot feels thread or whatever.
>>
>>27918384
As soon as people start giving linux support for all software and firmware. So basically never.
>>
>>27917389
Thank you. So what might the class be called? Intro to computer.programing?

I assumed great programmers are just natrualy good at it like you went to school for it but I would guess you do a few things on yoyr own before that.

Oh and I was joking about msdos, I knowit wasnt that.
>>
>hacking
I recommend
http://www.isis.poly.edu/
If you're familiar with hacking. Been subscribed to their mailing list for maybe 3 years now and they certainly do good teaching. You get access to videos and streams even. Their chat is pretty good too when active.

Not sure what their policy is on enrollment but I don't care.
>>
Please give me some guides on reverse engineering
>>
>>27918479
you clearly have never been to /g/
so fuck off
>>
Anyone here used udacity?
>>
>>27919013
What's wrong with /g/? Ive never been there.

veryoriginalcommentforsure
>>
>>27916836
should i go for programming or computer security? Both are fine for me
>>
>>27919060
>my obscure linux distro > your obscure linux distro
>windows is the worst thing ever
>NSA spybots in everything (actually true but still)
>YEAR OF THE LINUX DESKTOP
I just saved you a trip
>>
>>27919004
I don't remember where but defcon had a video that showed a guy who was completely new to stuff and some boss put a thing on his desk, told him he wanted to know how it works and he just had to do it. It was a great introduction to trying something. I can't remember what it was called..
It's a shame because I found it really informative long ago.

Either way defcon talks are usually really fun.
Like these two.
https://www.youtube.com/watch?v=JsVtHqICeKE
https://www.youtube.com/watch?v=DMNSvHswljM
>>
>>27919060
/g/ become reddit central in 2014.

>make thread asking for help
>get 150 replies bitching about the sticky and muh quality of threads besides the fact we only use generals hurrdurr

Oh and apparently TOR is a no no now.
>>
>>27919341
I'm more concerned with the insecurity of users.
Like when Tox was being made.

Hadly anyone contributed. There was no support and the entire fucking threads were filled with
>doesn't anonymize you
As if they didn't get it. Too much fucking trolling. The entire system was pretty damn cool. The decentralized nature of it was just amazing. And I really liked the hole punching too.

So frustrating. It wouldn't have happened in the past. We'd have used Tox gladly and everything would be rosy.
>>
>>27919144
ah, so basically linux hipsters
>>27919341
ah, that's pretty shitty. if you dont want to help someone can just ignore the thread.
>>
>>27919060
it's basically
>desktop thread!
>headphone general
and other generals that after 5 replies degrade into a arch vs debian or some dumb shit like that flame war
>>
>>27919341
desktop threads is what killed gee

>op posts pic of ODC weeb dual monitor windows 8 glass desk with your typical back breaking office chair
>next 149 images follow suit except the one actual messy basement dweller that appreciates comfort
>>
I got a degree in a decidedly non-computational engineering yet my job right now is programming.
>>
>>27919544
You're looking for a job right now I hope.
>>
>>27916836
Could I contact you with more personal questions? You're probably busy and all, but these are areas I have an interest in learning more about.

I can't really give you much in return - unless you're interested in learning about the social sciences or just want friendly conversation.
>>
Is coding safe as a job?

It seems like there is heavy competition, form Gandhi in India who will do it for pennies and of course the Progressive left trying to flood the market with every human being possible.
>>
>>27919600
Indians have extremely high turnover (can have a group of programmers be replaced multiple times in a year) and it's hampering outsourcing significantly.
Many of them are also not good.

It's a safe job. Especially if you have an interest.
>>
>>27919445
idc anymore. cripplechan /tech/ is better.
>>
Can someone give me advice? I'm in my third semester of CS. I like programming for class, but I've only had one sizable project so far, the rest has been smaller assignments, and I've found that I hate self-learning. I try to pick up some stuff for side-projects and I just can't. I also have zero passion for technology whatsoever. What sort of career paths should I be looking at?

And to clarify, I actually love coding for class. When an assignment is released I always do it that night, even though I'm a lazy fuck who has always struggled with actually doing homework. So I do love programming, just very indifferent towards technology, and I'm not self-directed if that makes sense.
>>
>>27919599
Not that guy, I'm a NEET but if it's programming questions I'm probably sufficient.
We can talk on Skype too (not associated to this email)
[email protected]
>>
>>27919656
>cripplechan /tech/ is better.
Yes. Certainly.
/dpt/ on /g/ is pretty OK some of the time. Have to filter the language chatter though.
>>
>>27919682
How about math?
It's about problem solving and it has little to do with technology.
>>
>>27919600
It's easier to be better than the mass, also not being autistic is huge also
>>
I'll fire another question if OP is here
how do I git job?
My main strenght is linux, the shell, some perl, and, well, linux.
I only have HS education, no college whatsoever.
I don't have a git because I don't have big projects at all, just a bunch of config files and scripts I've written to help me with some tasks
>>
Suggestions /r9k/

>Work Desktop support at a university and do a masters in MIS with Sec concentration
>Go external doing NOC, SOC, or Desktop Support with my crummy BA
>>
>>27919850
no op
Are you applying for jobs?
If not do that.
Are you submitting pull requests on git?
If not those can be considered part of your portfolio so they're worth considering.
Why aren't you putting up your crap?
Most employers don't have the dev team screening your shit. Interviewers look for enthusiasm and clear merits because that's all they can really judge.

Google "how to get a job with no format education in field X" or something.
>>
>>27919905
>Google "how to get a job with no format education in field X" or something.
lol, thanks. I'll try that.
Anyway I really don't even have a git account because I've never had the need for that, nor I know how to use git, and I don't really know what I could pull request because all I use is the traditional old software (vim, zsh, perl, coreutils...)
>>
>>27919969
>nor I know how to use git
Good to know. Also subversion.
>>
Any experience with OpenCV and video/motion tracking on a live stream?
>>
>>27916836
I'm an engineering student and i like to code on my free time. will like to end up in a software dev type job or code monkey just to get some experience. I have a github with like 2 small projects and a portfolio. got any tips on what i can do to get an internship, like specific projects that i can do that look impressive? or just general tips
Thread replies: 72
Thread images: 10

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.