[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
/dpt/ - Daily Programming Thread
Images are sometimes not shown due to bandwidth/network limitations. Refreshing the page usually helps.

You are currently reading a thread in /g/ - Technology

Thread replies: 255
Thread images: 40
File: giphy.gif (404 KB, 500x281) Image search: [Google]
giphy.gif
404 KB, 500x281
old thread >>54052326

what are you working on you demon spawn degenerates /dpt/?
>>
you rmom
>>
>>54063063
a daemon spawn degenerator
>>
File: 1451683513443.gif (2 MB, 400x225) Image search: [Google]
1451683513443.gif
2 MB, 400x225
>>54063063
Got a webdev job, which is fun as fuck
>>
>>54063094
out pls
>>
>>54063094
Did they ask you to fizzbuzz in the interview?
>>
>>54063112
>CSS fizzbuzz
>>
Fuck, anons tripforce didn't work for that. Trying again
>>54063107
How come?

Also webdev is not as much of a meme as /dpt/ makes it out to be, especially for back-end. You have to learn a variety of languages and frameworks, and it's pretty similar to application development, barring it being on the web

>>54063112
Nah, there were tough django/server-based questions
>>
File: 1449141548334.jpg (12 KB, 230x219) Image search: [Google]
1449141548334.jpg
12 KB, 230x219
You have been visited by the crossdressing C programmer of Shimoshina Academy!

Good performance, triple indirection, and tail call optimization will come to you, but only if you post "Keep overflowing the stack, Hime!" in this thread.
>>
>>54063122
>webdev
>CSS
anon...
>>
File: g_fullxfull-29942.jpg (108 KB, 1280x720) Image search: [Google]
g_fullxfull-29942.jpg
108 KB, 1280x720
>>54063128
.::ANTI TRAPS STRICTLY ENFORCED::.
>>
>>54063126
/dpt/ is not for web dev
>>
>>54063126
I think you're looking for /wdg/

which is WEB DEV general
>>
File: recursion kills.jpg (113 KB, 638x493) Image search: [Google]
recursion kills.jpg
113 KB, 638x493
>>54063128
Keep overflowing the stack, Hime!
>>
itt autists who curse all webdev because they couldnt center that div, that one time..
>>
>>54063128
Keep overflowing the stack, Hime!
>>
File: 1451683583776.gif (2 MB, 400x600) Image search: [Google]
1451683583776.gif
2 MB, 400x600
>>54063141
>>54063148
>programming is not for daily programming thread
Sorry mate, but I'm staying. We can talk about non-webdev programming if you'd like. Anyone doing google code jam?
>>
>>54063154
>>54063160
you're worse than facebook memes
>>
>>54063168
Stop posting this slut, she looks uncomfortably like my cousin and it gives me a confused boner
>>
>>54063168
I started qualifiers a day late and missed the cut by a point lol
>>
>>54063176
>not wanting to fuck your cousin
>>
>>54063176
Because she's too young for it not to be weird?

>>54063168
Web dev =/= programming
>>
>>54063128
Keep overflowing the stack, Hime!
>>
>>54063141
>webdev isn't programming
>>
>>54063186
>Web dev =/= programming
So when you're doing back-end web development in Java, Python, C#, or any language of choice which can process a request and produce responses, you're not programming?

lmao ok friend
>>
>>54063195
>implying implications

It's babby program to be honest family
>>
>>54063198
full-stack developer != webdev
>>
Is java good programming language to learn?
>>
>>54063198
back end is not web dev
>>
>>54063198
Even CSS nowadays is compiled from LESS and SASS form. Ignore the autists.
>>
>>54063228
JESUS CHRIST NO
>>
File: tumblr_nvc8a8n8h21rfpbpno1_500.gif (1 MB, 500x281) Image search: [Google]
tumblr_nvc8a8n8h21rfpbpno1_500.gif
1 MB, 500x281
>>54063201
Considering Unity WebGL code is compiled to JS, and games are not trivial programming, you clearly don't know what you're talking about. You can do a lot more with ES than /dpt/ makes out. Even making emulators and games most of my life, I've found back-end to be pretty challenging in different ways.

>>54063216
Cool, so let's talk about full-stack

>>54063231
Cool, so we can talk about back-end, got it
>>
>>54063241
A B S T R A C T I O N
>>
I have a junior embedded engineer interview (c and verilog) coming up for a company that does FPGAs. What should I expect? I really want this job
>>
File: eeäs.jpg (14 KB, 480x360) Image search: [Google]
eeäs.jpg
14 KB, 480x360
>>54063240
why?
>>54063241
>ES
haha
>>
>>54063249
She's not that abstract m8
>>
File: Java.png (17 KB, 484x402) Image search: [Google]
Java.png
17 KB, 484x402
>>54063275
literally 5 minutes ago
>>54062681
>>54062919
>>54062976
>>
Do any of you guys have that picture of guys vs girls coding? It's a screenshot from Twitter.
>>
File: best gx.jpg (25 KB, 468x351) Image search: [Google]
best gx.jpg
25 KB, 468x351
So who's this new tripfag with the girl's name?
>>
File: when girls code.jpg (226 KB, 869x1776) Image search: [Google]
when girls code.jpg
226 KB, 869x1776
>>54063291
i got ya bb
>>
>>54063299
A girl, obviously.

btw Ruby !offrails is a girl too.
>>
>>54063290
What would be better programming language then?
>>
>>54063318
if you're wearing a skirt, you're a girl!
>>
>>54063314
F#
C#
D
C++
C
>>
>>54063128
>triple indirection
Most people consider that a bad thing, you know.
>>
File: 1453653439650.jpg (160 KB, 1000x667) Image search: [Google]
1453653439650.jpg
160 KB, 1000x667
>>54063290
pic related is due to optimization quirks, Java iirc stores integers from 0-256 in memory, so a100 and b100 point to the same thing and so are equal. There's nothing wrong with optimization if you know how the language spec works, you can do C optimizations if you abuse weird quirks like overflowing into another block of data, and people will call it shit

That being said, it's the least of Java's problems, lack of pointers and memory management is the crux of issues like this, along with other points that make it a shit language

>>54063314
C. C++ if a sizable game. Python for anything not too intensive
>>
>>54063326
But she's also giving you good performance
>>
File: memes.jpg (46 KB, 695x431) Image search: [Google]
memes.jpg
46 KB, 695x431
>>54063327
We all know WHY Java does it, it's still retarded. Can't say the same for C, because C actually makes sense.

>Python
>>
>>54063326
my code makes very heavy use of 3 star programming.
i just don't use 3 stars directly, because like any sane person, I use local pointers as shortcuts to much larger dereferenced structures

have you ever made an array of struct pointer arrays?
>>
>>54063314
Literally anything.
Don't listen to the autists on /g/
Here have some reasonable advice:
- C++ is the industry standard because it allows you full control of memory and speed, and allows for nearly every paradigm. You don't need to use this language if you don't need the above.
- Python and Ruby are fun languages made to be simple and easy to get small shit done. Use this for simple stuff like conway's game of life. IMO their simplicity is subconsciously geared towards programmers, making it not as good of a beginner language as they claimed. I have some weird ideas for what would make the ideal beginner language but I won't explain it in detail
- Java still carries outdated shit on its shoulders, like C++ except without good reason. OOP needs to disappear from the mainstream and can't come soon enough
- Haskell pure FP is a meme but it's really fun working in Haskell. Even though dependent-typed languages are arguably more powerful, more research has gone into making Haskell a usable language
- C is incredibly difficult to program anything worthwhile in, and you should nearly always write in C++ unless you are working really close to metal.
>>
Is it easy to make gui on C++?
>>
>>54063351
qt
>>
>>54063128
>TCO
;---^)
>>
File: smash dat like button lel.jpg (32 KB, 720x480) Image search: [Google]
smash dat like button lel.jpg
32 KB, 720x480
>>54063348
>C is incredibly difficult

post discarded
>>
File: 1453653439621.png (263 KB, 500x666) Image search: [Google]
1453653439621.png
263 KB, 500x666
>>54063340
>it's still retarded.
Not saying it isn't retarded
>Can't say the same for C
Same, but it's because of these lower-level quirks that people will make memes out of C

>python-hate
I'm not in the business of reinventing the wheel. I would make intensive things like emus/games in C, but there is little gain in not using python when speed isn't an issue.
>>
I see a lot of hates on globals, but what about static methods and members?
Aren't they practically the same?
>>
>>54063368
If speed isn't the issue you should be using F#
>>
>>54063348
I don't think I've ever seen a post with this many misguided memes.
>>
>>54063363
just got the joke
thank god nekomimi aren't furries
>>
Daily reminder that C++ is deprecated by C11
>>
>>54063372
No, static methods and members are better, and you can use CRTP to subclass it, and while you're still polluting the global namespace, it's all contained in a class. Global things in general are disadvantageous to scalable programs due to coupling and other factors, unless you've limited your program's spec and know what you're doing

>>54063385
I prefer the pip package environment
>>
>>54063411
>post number ends in 11
P O T T E R Y
>>
>>54063412
>alexis
are you a girl, or a misguided boy who thinks he's a girl on the inside?
>>
File: 1453653438419.gif (147 KB, 850x613) Image search: [Google]
1453653438419.gif
147 KB, 850x613
>>54063433
I post Alexis, you dummy
>>
>>54063433
It's a boy who thinks he's a thinks she's a he in a herself heman is
>>
>>54063445
Kill yourself, you fucking avatarfag.
>>
File: 1451754656606.png (17 KB, 418x359) Image search: [Google]
1451754656606.png
17 KB, 418x359
>>54063465
What are you programming tho?
>>
Spent a few hours tracking down a bug that caused half of the UI textures to suddenly vanish.

I finally wrote my own glDeleteTextures() wrapper ("myDeleteTextures") that logged all handles it was deleting and where it was being called from.

Turns out it was just *one* faulty glDeleteTextures() call that nuked three random texture handles. Repeat it often enough and eventually it hits something that's in use, and UI/font textures go boom.
>>
File: TheProdigy.jpg (236 KB, 1737x662) Image search: [Google]
TheProdigy.jpg
236 KB, 1737x662
Stop talking about traps, start talking about The Prodigy
>>
>>54063474
Tripfag, avatarfag AND a frogposter?
You seriously need to end your life.
>>
File: dpt programming advice.png (6 KB, 433x91) Image search: [Google]
dpt programming advice.png
6 KB, 433x91
>>54063474
Newfags must leave
Tripfags must leave
Snekfags must leave
>>
What's some good, quick, concise material to read on good OOP design? Mainly things concerning the planning stages, figuring out what parts of a the program should be part of what classes, etc.
>>
>>54063504
>OOP
don't ruin your life with this meme
>>
>>54063512

Let's pretend I don't have a choice.
>>
>>54063552
>pretend
So you do have a choice?
>>
>>54063504
>OOP
>any good design
Just make sure your objects are decoupled from each other, and that they're interacting with each other through an interface until you have finished formalizing your product's spec, which you probably haven't considering your question
>>
File: mfw waiting2.gif (302 KB, 340x300) Image search: [Google]
mfw waiting2.gif
302 KB, 340x300
I just bought an american copy of K&R to replace my disgusting india edition that was literally covered in 20 year old caked on filth (poo?) when I bought it.

I also bought a copy of the the ISO 1990 C standard for $4.
>>
>>54063593
>Buying an outdated standard
>>
>>54063561

I probably deserve the pain.

>>54063573

This is basically what I assumed. Thanks.
>>
/dpt/, as someone who has a few years experience as a SQL database administrator and intermediate knowledge of Java/Eclipse, what is the best way to break into the coding/programming industry?

It seems that the general consensus is split between internships and freelancing up a portfolio.
>>
File: 161hq2p.png (25 KB, 400x255) Image search: [Google]
161hq2p.png
25 KB, 400x255
I'm implementing IEEE754 floats as lists of bits in snek language
>>
>>54063623
Portfolio is the easiest, most trustworthy, future-proof and quickest way, if you make things that interest you. Even knowing snek for only 5 months got me a job without a degree.

>>54063624
In straight snek, or extending with C? If former, literally why?
>>
>>54063624
That's gonna perform amazingly as soon as you plug in the high performance C libraries (TM) that snek will take the credit for
>>
fellas, this post/series of posts caught my eye on /pol/ earlier.

>Pick one and learn. All programming fundamentally uses the same logic, it's just different APIs and syntax. A good programmer can go to any language and learn it quickly. (with exceptions)
>If I had to recommend one, I'd say start with C++, although many would disagree. Use codeacademy & torrent some paid courses. Or watch youtube videos. There are so many resources it's insane. One of the reason you don't really require a degree as long as you can show you're not retarded
>I write automation software.
>My formula is simple;
>1. Market Research
>2. Determining if I can do it cheaper AND better (usually the answer is yes, especially if I'm competing with Asia)
>3. Doing it

is this a good approach and what kind of earning power do you have with C++ skills?
>>
File: tumblr_mrllfdQGxx1qjqxmoo1_250.gif (1 MB, 250x375) Image search: [Google]
tumblr_mrllfdQGxx1qjqxmoo1_250.gif
1 MB, 250x375
>>54063721
>Pick one and learn. All programming fundamentally uses the same logic, it's just different APIs and syntax. A good programmer can go to any language and learn it quickly. (with exceptions)
This is largely true, although their distinctions lie with their support. Package managers, frameworks and libraries can determine how useful a language is.
>If I had to recommend one, I'd say start with C++, although many would disagree. Use codeacademy & torrent some paid courses. Or watch youtube videos. There are so many resources it's insane. One of the reason you don't really require a degree as long as you can show you're not retarded
I wouldn't suggest codeacademy/torrent/videos in general. Absolute C++ by Walter Savitch is my personal favourite resource for C++, as an important part to learning is applying, and the editions of this book give you somewhat challenging tests (though not as challenging as SICP is to LISP languages)

>I write automation software.
>My formula is simple;
>1. Market Research
>2. Determining if I can do it cheaper AND better (usually the answer is yes, especially if I'm competing with Asia)
>3. Doing it
Automation software is pretty big when it comes to job searching too, so this may be a useful formula to success, even if not doing it in a corporate environment.

>is this a good approach and what kind of earning power do you have with C++ skills?
Still huge, especially in the finance sector and the game industry
>>
>>54063643

Since I'm new on /dpt/, and programming in general, can someone chime in if this is a trustworthy tripfag or a memespouter?
>>
File: img-thing.jpg (26 KB, 300x300) Image search: [Google]
img-thing.jpg
26 KB, 300x300
>>54063775
I'm both imo
>>
>>54063796

Since no one else is replying at 3 in the morning, I have no choice but to turn to you.

You say snek and I googled around and all I can find is a busted meme from circa 2012. What is snek?

I've been browsing around ODesk and Upwork and its dominated by Indians and SEA Asians who already have arguably sturdy portfolios. As someone with literally 0 portfolio and coming out of the woodwork, should I charge 5-8 USD per billable hour to get started? Keep in mind I have a steady full-time employment that leaves me a lot of free time to tinker around.

And thank you.
>>
>>54063772

thank you
>>
should I learn C++ or python?
>>
>>54063873
Neither
>>
>>54063828
snek is Python

Whether you want to do a portfolio of paid projects, or your own personal free projects, you should work on constantly working and building a variety of interesting, possibly tough projects. If you can't get in paid due to indians and SEA asians, consider investing your time in just doing free work. For reference, I made that chip-8 emulator in C with python comiler+assembler, esoteric language interpreters, and synacor-challenge.com virtual machine in python, and that helped a ton getting a Python/Django job with 0 experience in webdev/django

>>54063845
No problem m8

>>54063873
C++ if you're interested in finance, games, or have a degree
Python if you're interested in scientific/mathematic research, webdev, or don't have a degree

Reason I mention degree is because if you have one, it's easier to get into C++, which will pay you more if you don't like webdev. If you don't have one, Python is still relatively easy to get into with a decent portfolio
>>
>>54063887

when you say 'have a degree', do you mean a degree in CS? or any degree.
>>
>>54063992
a STEM degree, CS probably helps a bit more, but I don't know non-CS STEM people who have had trouble getting a programming job if they've even just tried the basics of a language
>>
>>54064014
don't fall down the stairs meme
>>
>>54063887

First of all, I would like to thank you very much for all the relevant information you are throwing my way.

Secondly, I understand you don't have a STEM degree as well, but was wondering if it was even a technical associate that you hold.

Secondly, I have been using java and javascript for backend database management and I would like to believe it has given me the absolute basics (loops, stacks, classes, etc).

I don't mind working on projects even full-time to jump start my career, but what exactly do I make? I'm someone who had to use scripts and programming maybe 15-20% of the time for "work" related stuff. I've googled around for beginner projects, but I feel that I would just grok a tutorial and produce a clone.

What would you recommend for someone with rudimentary Java to undertake, or should I just jump onto Python, learn that, and then focus on a project? I also have some basic on the job training for Spring Frameworks.
>>
>>54063887
I want to start programming as a hobby
>>
>>54064093
go with python

Its extemely easy to write basic stuff in that.
>>
>>54064098
python teaches bad habits

learn C
>>
File: 1453653439216.jpg (162 KB, 750x747) Image search: [Google]
1453653439216.jpg
162 KB, 750x747
>>54064091
No problem. As far as qualifications go, I have BTEC HND in ComSci (HONS) with Distinction, and that's it, not even certs.

If you've used java/js for backend, you're pretty much set for getting backend job right now anyway if you can find one using Java.

>what do I make
What things interest you? What things bother you that you can do better? Alternatively, you may find inspiration doing coding challenges. synacor-challenge.com, microcorruption.com, hacker.org, codingame.com, and even hackerrank.com are all useful for teaching new things and providing ideas for unique challenges

If you're really into Java, learn Spring

If you want to try Python, that is also invaluable as Django is probably more popular than Spring

>>54064134
not the bad habits meme
>>
>>54064134
Subscribe to the C religion, because big ugly procedures and manual memory management are great for maintainability.

Why does /dpt/ have so many baby programmers?
>>
>>54064173
>big ugly procedures
That has literally nothing to do with the language. You can write shit in anything.

>manual memory management
Shit is pretty easy.
>>
>>54064167
Completed missed that you have basic ojt for Spring. Keep practicing it more, making your own site with advanced features that you like. Look on the job market for tech that is popular with Spring
>>
Never do Python, C/C++ is a good choice
>>
Does anyone have that big list of small things to write?

Challenge list or w/e its called
>>
>>54064167
>>54064210

I guess I should have brought up that point sooner, but I am hoping to break into software engineering. Software engineering (if I'm not mistaken), seem to be much more hacking heavy than the other fields. I just feel stuck in a hole because at this point on my careerpath the only thing I can really aim for is to become a senior database administrator, since I lack the credentials to become a director unless my networking pulls a hail mary.

It seems that most people nowadays have 4-5 languages under their belt, and I was hoping to pick up snek as everyone is going on and on about how simplistic it is, even for those who have no background in code.

I guess the whole issue with me is, I want to become a codemonkey, but I have no idea what the hell I want to code.

I understand that my problem is more abstract personal issue rather than a technical issue, but any input from yourself would be appreciated regardless.
>>
>>54064173
>maintainability

python is famously terrible for maintaining anything more complex than a toy program
>>
What.

So is python good language?
>>
>>54064245
>C/C++
Why are you grouping two completely different things together like that?
That's like doing Java/Javascript.
>>
>>54064014

when you say 'programming job', do you mean going into an office and working as part of a team of programmers, or a job done remotely from home?

no STEM here, though both parents are. econ degree from ivy league school, NEET for a while, only work experience in finance at a boutique firm trading on a proprietary level two platform. no coding experience.

any books you'd rec for someone new to coding in addition to the Savitch?
>>
>>54064288
NO

learn C.
>>
>>54064313
No.

C is just meme.
>>
>>54064167
Having a HND (especially with Distinction) is quite different from having no qualifications.

It's literally one tier below a bachelor's and many people consider it "close enough" to a degree, even if it isn't one in name.
>>
>>54064297
Most C++ is just C

>>54064288
No
>>
>>54064316
You clearly don't know anything.
>>
>>54064256
>I want to become a codemonkey
Then webdev as a profession is not a bad choice. As they say, don't make your hobby your job, I still aspire to make games and emulators in my free time over my own site. At least webdev is fun and easy as a job.

If you want to become a codemonkey, then those challenge sites should be very appealing to you

>>54064288
Yes

>>54064298
>do you mean going into an office and working as part of a team of programmers, or a job done remotely from home?
They're both the same, just that the latter is either dependent on company, or only after a certain time in some companies.

Other than the Savitch, the SICP is not bad for at least improving your problem-solving skills, which are the primary sought-after skills in the better tech companies
>>
>>54064324
yes
>>
>>54064316
>>54064313
>>54064245
>>54064134
>>54064098
He said as a fucking hobby
>>
>>54064332
As a hobby, you shouldn't do Python
>>
>>54064322
>Most C++ is just C
Have you even seen any C++ that isn't just C++98 "C with classes"?
>>
>>54064336
Well he certainly shouldn't bother with C
>>
>>54064271
I never said Snek language was good. Guido is a moron who hates functional programming.

Clojure would be a much better choice.
>>
>>54064318

HND apparently is the American equivalent of an Associates Degree. I have a four year degree in area studies and only landed my job (I'm the backend database guy) because I was fluent in two Asian languages on graduation. I'm still working for the same Japanese banking company that trained me. Are my credentials kind of fucked?
>>
>>54064353
Since you already have work experience, the lack of an IT-related degree probably won't be that big of an issue.
>>
>>54064351
Why not?
>>
>>54064342
I program mostly in C++. I often use templates (and metaprogramming), functional paradigms, lambdas, references, operator overloading, etc

It's honestly mostly C
>>
>>54064382
For a hobby he should something that is on the easier side of languages.
>>
>>54064405
C isn't "harder" than Python, C doesn't need to be hard at all. If C's too hard he can do C++.
>>
>>54064399
Why, just because it's a C-like language?
std::chrono::duration_cast<std::chrono:milliseconds>() sure is C.
>>
>>54064405
Python is not easy.
It just hides all the complexity from the user because everything is already made for you.
For the beginner, this quickly becomes a crutch because you never learn to do anything but glue together other people's libraries without ever learning how to implement them and improve them.
>>
>>54064328

thanks again
>>
>>54064419
Does everyone here actually have autism?
>>
>>54064419
C++'s complexity is far more overwhelming that C's.
I don't know why people act like it's easier; it's a god damn clusterfuck.
>>
>>54064328

I did look into webdev slightly as per your suggestion, some job posting and youtube vids entailing the job duties, and it seems a little graphically inclined.

I guess I'm asking to see if a position actually exists where a manager/pm comes to your desk, throws down the project manuscripts, says "code all of this by x o clock on y date."

I apologize if I'm being super difficult to work with, but until 3 days ago I didn't even know my current job was considered in the computer science field.
>>
>>54064288
No but it isn't terrible either. If you want a programming language that "werks" use it.
>>
>>54064441
C++ gives you the tools, the complexity is as big as you want it to be.
C is harder only because the standard library is smaller and there is no STL (among other things like raw pointers, no exceptions, etc.)
>>
>>54064399
Once you use operator overloading, it's not even nearly as useful as C since you can't wrap it in extern C for portability with other systems/languages

>>54064433
No problem

>>54064444
>and it seems a little graphically inclined.
It's not at all. My work, as graphics go, just involve the displaying of numbers or text. Excepting graphics, most of my work revolves around the back-end logic: changing models/objects, form validation, processing imported/exported files, etc

>I guess I'm asking to see if a position actually exists where a manager/pm comes to your desk, throws down the project manuscripts, says "code all of this by x o clock on y date."
That's pretty much what I'm doing, but with loose time restrictions

>I apologize if..
Not at all, this info could help a ton turning a person's life for the better

If you really insist on programming application-like software instead, it depends on your language, I can't tell who I'm replying to anymore
>>
>>54064425
that's just scoping and templates, it might as well be

std_chrono_duration_cast(std_chrono_milliseconds)();
(macro)

C++ without C:
auto add(auto a, auto b) {
???
}

oh wait, whoops, I meant

auto add ?? auto auto ???
???

>>54064434
>>54064441
bullshit
>>
>>54064399
Go is more C than C++
>>
>>54064501
That's because Go is stuck in the 1980s
>>
>>54064488
By your shitty logic, every C-like language is just C.

>>54064506
Right. The period when ANSI C was defined.
>>
>>54064518
You cannot write C++ code without C

C-like languages are not all like C
C++ shares the memory model, shares the function model, shares the basic types (enum class notwithstanding), etc
>>
>>54064478

Made a temp trip for this thread.

That was me you were replying to, and I'm just so bored of the monotony of entering fucking data into SQL servers. As I said before, only 25% of what I do is backend stuff, and that's the stuff I really actually enjoy. The frustrations of fucking up a tiny bit of code and scrounging on stackoverflow for hours looking for the answers and then that huge feeling of relief when you don't have to rebuild messed up legacy code.

The other 75% of the time I'm plugging in info from PuTTY or Salesforce depending on what department is up my ass that particular day.

http://www.payscale.com/research/US/Job=Web_Developer/Salary

I see that the first "skill tree" into the next position within the career is a software engineer/developer, so I will be picking up website development with high hopes.

Thank you so much for the information!
>>
>>54064474
raw pointers exist in C, they're called POINTERS
>>
>>54064535
>hurrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr
It's almost as if when people say C-like they mean the syntax.
>>
>>54064553
>I see that the first "skill tree" into the next position within the career is a software engineer/developer, so I will be picking up website development with high hopes.
Indeed, that is also a plus. Backend web dev is almost like application development anyway since processing requests and outputting responses works almost the same way, except the responses are in html form rather than a window form. So if you really were interested in that, this is definitely at least a stepping stone, since it'll be easier to get into with your current experience

>Thank you so much for the information!
Anytime! I'm sure you'll be able to get what you want
>>
File: intel.jpg (9 KB, 246x227) Image search: [Google]
intel.jpg
9 KB, 246x227
TRIPFAGS
SNEKFAGS
WEBFAGS
JAVAFAGS
PUREFAGS
GCFAGS

https://www.youtube.com/watch?v=OSCiMbMVDLI
https://www.youtube.com/watch?v=OBwS66EBUcY
>>
I wanna make a web application in C because that's all I know.

From what I understand, you can make it interface with apache or ngnix so all you worry about is producing web pages as output, right?
>>
>>54064617
You guys are so devoted to C it's rediculous
>>
>>54064617
Pretty much.
>https://en.wikipedia.org/wiki/Simple_Common_Gateway_Interface
https://en.wikipedia.org/wiki/FastCGI
>>
>>54064617
You can do back-end web dev in ANY language that has the logical capability to turn requests into responses, and it can interface with those other layers like apache/nginx. Just being able to interface with C gives you that capability.
>>
>>54063643
In straight snek so that I can change rounding rules etc whenever I want

It's for a programmer's RPN calculator
>>
File: ms.jpg (248 KB, 1920x1041) Image search: [Google]
ms.jpg
248 KB, 1920x1041
>>54064441
I'm going to make someone cry.
void AWorldHexControl::GenerateFloor(UInstancedStaticMeshComponent*& _Component)
{
if(_Component == nullptr) { return; }

FVector vec, mvec;
auto instantiate = [&_Component, &vec, &mvec]() {
_Component->AddInstance(FTransform(vec));
_Component->AddInstance(FTransform(mvec));
};
auto instantiate_fill = [&_Component](int range, VectorConstants vc) {
int tileFilled = 0;
bool odd;
FVector xPosi, xNeg, xmPosi, xmNeg;
for(int fillCount = 1; fillCount <= range; ++fillCount) {
odd = (fillCount % 2 != 0) ? true : false;
for(int x = 1; x <= range - tileFilled; ++x) {
if(odd) {
xPosi = FVector(vc.xPos.X * x - 100, vc.hInc.Y * fillCount, 0);
xNeg = FVector(-vc.xPos.X * x + 100, vc.hInc.Y * fillCount, 0);
xmPosi = FVector(vc.xPos.X * x - 100, -vc.hInc.Y * fillCount, 0);
xmNeg = FVector(-vc.xPos.X * x + 100, -vc.hInc.Y * fillCount, 0);
} else {
xPosi = FVector(vc.xPos.X * x, vc.hInc.Y * fillCount, 0);
xNeg = FVector(-vc.xPos.X * x, vc.hInc.Y * fillCount, 0);
xmPosi = FVector(vc.xPos.X * x, -vc.hInc.Y * fillCount, 0);
xmNeg = FVector(-vc.xPos.X * x, -vc.hInc.Y * fillCount, 0);
}
_Component->AddInstance(FTransform(xPosi));
_Component->AddInstance(FTransform(xNeg));
_Component->AddInstance(FTransform(xmPosi));
_Component->AddInstance(FTransform(xmNeg));
}

if(odd) {
++tileFilled;
}
}
};

_Component->AddInstance(FTransform());
if(range > 0) {
for(int x = 1; x <= range; ++x) {
if(x % 2 == 0) {
vec = FVector(VectorC.yPos * (x / 2));
mvec = FVector(-VectorC.yPos * (x / 2));
instantiate();
}
vec = FVector(VectorC.xPos * x);
mvec = FVector(-VectorC.xPos * x);
instantiate();
}
instantiate_fill(range, VectorC);
}
}

And I will cry with them.
>>
>>54064701
>== nullptr

REEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEE
>>
>>54064727
What's wrong with null checks?
>>
>>54064742
!_Component
>>
>>54064742
what's wrong with
(_Component == NULL)
, or simply
(!_Component)
>>
>>54064753
nullptr isn't 0 or NULL
>>
>>54064753
You don't know what a nullptr is
>>
>>54064701
? this is good
post the C version
>>
>>54064763
>>54064771

If you are developing for a platform on which a null pointer is not a pointer set to 0, fucking quit

JZ and JNZ are there for a bloody reason
>>
>>54064763
>>54064771

A prvalue of arithmetic, unscoped enumeration, pointer, or pointer to member type can be converted to a prvalue of type bool. A zero value, null pointer value, or null member pointer value is converted to false; any other value is converted to true . A prvalue of type std::nullptr_t can be converted to a prvalue of type bool ; the resulting value is false .
>>
>>54064786
why would you want a null pointer to be an integral type? lmao
>>
>>54064829
Them floating pointers
>>
>>54064795
there is still the ambiguity about whether that false value was a pointer to 0, a null pointer or a null member pointer value, which is why the distinction is necessary. !_Component means what should be a nullptr is actually a pointer to 0
>>
>>54064851
A null pointer will be converted to false, the only change over == nullptr is that on the few systems where it's different, you'll have an extra byte of memory at 0x0..
>>
>>54064870
>is that on the few systems where it's different
exactly
>>
File: tfw.png (189 KB, 2560x2489) Image search: [Google]
tfw.png
189 KB, 2560x2489
(defn fib [n]
(if (< n 2) n
(+' (fib (- n 1)) (fib (- n 2)))))

(def fib (memoize fib))
(time (prn (fib 230))) ; 522002106210068326179680117059857997559804836265N
; "Elapsed time: 7.603744 msecs"

Here's my comfy straightforward fibonnaci, /g/. How can I make more efficient? It's in closure btw.
>>
>>54065015
>doesn't use exponentiation of closed form

Hang on, I seem to have dropped my rope while I was throwing up and shitting blood
>>
>>54063323

Congratulation on naming the languages who are even more retarded then java (apart from C# and maybe D).
>>
>>54065015
>How can I make more efficient?
There's an algorithm for fib that doesn't require memoization or do it in fib time, and just operates on the given 2 values
>>
>>54065015
Stop posting frogs, for one.
>>
I've never done 3D programming before, and have barely any clue of the maths behind it.
Basically I have to rotate a 3D model.
However, how would I transform according to the viewpoint?

E.g. the model starts with its axis' aligned to the viewpoint. But when it gets rotated they get out of sync, obviously. Now, when I want to rotate it across the Y axis according to the viewpoint (after a previous rotation), how would I transform this matrix into something applicable to the model? Because rotating it across Y on the model will give completely different results.
I know this should be something really simple, but I never learned anything about it.
>>
>>54065142
quaternions is what you're looking for
>>
>>54063128
Keep overflowing the stack, Hime!
>>
>>54063305

>it is a hacker code used to steal nude photos

kek
>>
File: testover.webm (3 MB, 684x385) Image search: [Google]
testover.webm
3 MB, 684x385
Ask your much beloved programming literate anything (IAMA)

>>54064434
He's right.

>>54064288
Yes.

>>54064313
C is obsolete.

>>54064763
>>54064771
>>54064851
T *ptr;

p == nullptr;


is same as
p == static_cast<T *>(nullptr);


and
static_cast<T *>(nullptr)
is same as
static_cast<T *>(0)


therefore, all of the following expressions are the same semantically

p == nullptr
p == static_cast<T *>(nullptr)
p == static_cast<T *>(0)
p == NULL
!p


>>54065142
http://immersivemath.com/ila/index.html
https://en.wikipedia.org/wiki/Rotation_matrix
https://en.wikipedia.org/wiki/Category:Geometry_in_computer_vision
>>
>>54065244
!p is ambiguous
>>
>>54063122
http://codepen.io/SachaG/pen/jCpba
>>
>>54065244
but is p == 0?

Checkmate agnostics
>>
>>54065244
>C is obsolete.
You're a fucking retard.
>>
>>54065294
Yeah. Does he even embedded systems?
>>
>>54065301
Even on non-embedded systems, nothing holds a candle to C.
Nothing is even close.
>>
>>54065316
t. programmer who's achieved nothing
>>
>>54065327
t. programmer who knows nothing
>>
>>54065332
t. programmer who thinks knowing obsolete tech holds a candle to programmers who have actually contributed knowledge
>>
>>54065345
>>54065332
>>54065327
>>54065316

t. alberto barbosa
>>
>>54065345
For something to be obsolescent, something has to obsolete it.
Tell me, what obsoletes C?
>>
>>54065362
t. balberto arbosa
>>
does anyone have experience with isolating pointers with scans? I have a variable I can manipulate that is a double or a float that I can't really isolate. There are a bunch of ways you can do pointer scans, right, but I sort of need to streamline this because every time the variable changes none of the values that come up were "it". Obviously integers are much easier, but it'd be really nice if someone knew anything
>>
please just leave newfags
>>
>>54065406
uwot
>>
>>54065406
What on earth are you talking about?
>>
>>54063241
would fuck this qt
>>
I've been wary to start learning android dev because it looks like a clusterfuck of complicated shit but now that I've started, I've got to say it's pretty easy.
>>
>>54065490
Which language? C, C++, Java, Python or something else?
>>
File: Capture.png (175 KB, 880x897) Image search: [Google]
Capture.png
175 KB, 880x897
>>54065427
>>54065421
well basically to reverse engineer something or whatever you can search for pointers in a running process

you can actually change these around if you'd like, as I did in this image
the pointer I need to find has a value that is either a double or a float and so is very difficult to isolate due the program truncating everything past .01

I don't expect you to understand instantly and be able to help me but that's what I'm trying to do anyways if you're curious
>>
>>54065529
Java
>>
>>54065490
It's horrible
>>
>>54065268
>>54064851
>>54064771
>>54064763
everytime something is supposed to be a "nullptr" in my programs I just write 0x0

go suck a big black hairy sweaty dick
>>
>>54065649
nobody cares about your non-portable software
>>
>>54065676
I don't write freedom shitware
>>
>>54065709
portable != free
>>
If I should start programmig with C, why then many people say that C is bad for starting programming.
>>
>>54065734
because they found it complicated themselves and want to meme you into Python and Scala
>>
>>54065734
Probably because they expect everything to hold their hand the whole way.
C is a fine beginner's language. It's very intuitive and teaches you programming in a "bottom-up" sort of way.
Expect to make mistakes when starting with C. Making mistakes is the best way to learn.
>>
>>54065747
>>54065734
languages are just tools
there's a very small set of things you need to do to 'know' a language, and once you know it in one language very well it translates pretty easily

some languages are well suited to different things, like standalone applications vs servers or whatnot but at their core they are all the same so all this shit about how hard a language is is really just confusing to me
programming isn't an art, it's a set of tools you can use to complete a task
>>
>>54065802
fuck off
>>
>>54065812
no
>>
>>54065802
>programming isn't an art
>He's never seen elegant code
>He doesn't strive for elegance
>Implying that programming doesn't require a lot of creativity
>>
>>54063122
>CSS fizzbuzz
@import "compass/css3";

ul{
list-style-type:none;
}
li:nth-child(3n), li:nth-child(5n){
font-size:0px;
}

li:nth-child(3n):before{
font-size:16px;
content:"Fizz";
}
li:nth-child(5n):after{
font-size:16px;
content:"Buzz";
}
>>
>>54065819
Art is just copying from others and doing your best to make it not look copied, while programming is... oh wait
>>
>>54065747
>>54065768
>>54065802
So C is just as good as java or python?
>>
>>54065831
>nth-child

You son of a bitch
>>
>>54065842
C or Python are good for beginners
Java is not and is not a good language anyway
Don't fall for the 'bad habits' guy's memes
>>
>>54065842
don't get me wrong, you should definitely learn java first
it is very specific and for learning it's really great

I as speaking a lot more generally
>>
>>54065842
I would argue that it's better.
I personally started with C, and I thought it was excellent. It's still my favourite language overall.

>>54065864
>Forced OOP
>Good for beginners.
>>
>>54065244
Suggest me a small-medium project etc etc.
>>
>>54065874
reimplement google maps
>>
>>54065870
I don't like Java either but that meme sucks donkey balls
>OOP
>hard to understand and bad for beginners
literally go fuck yourself with a cactus
>>
>>54065874
fix your lack of creativity ? fuck, you are the only here asking everyday for projects.
>>
>>54065899
Not him, but it's not good for beginners because it might make them think in OOP all the time. Why do you think design patterns exist? Because of OO ineptness
>>
Why am I even asking for help at 4chan
>>
>>54063094
KILL YOURSELF
>>
>>54065899
Java preaches OOP as the only way to write programs, and beginners will fall into that shitty trap.
I would argue that OOP is actually pretty shitty overall, and is only suited to certain types of problems. It should be taught as a tool, not as gospel.
>>
>>54065916
Did someone disagree with you?
>>
>>54065921
it's literally the only good way to write programs. even in C you end up with a kind of cobbled together OOP.
>>
File: tumblr_mtjkvlIiCU1sy7qozo1_1280.jpg (406 KB, 1000x667) Image search: [Google]
tumblr_mtjkvlIiCU1sy7qozo1_1280.jpg
406 KB, 1000x667
>>54065917
You know, JS ain't too bad

Some anon posted this before in a different thread:
https://github.com/AlexNisnevich/untrusted
Solve levels by filling in JS, it's pretty fun
>>
>>54065925
Just to clarify, "structs and functions that work on those structs" is not OOP.
>>
>>54065938
yes it is, the most basic form of OOP is just a syntactic sugar for structs and functions that work on those structs
>>
>>54065911
you can also write in assembly and use structures everywhere
what's your point?
>>54065938
but desu it actually is
>>
>>54065907
Everything is too hard.
>>
>>54065925
>even in C you end up with a kind of cobbled together OOP
The entirety of SDL, the standard for gamedev, disagrees with you. Even if you say it's not a game in itself, it is a large C project
>>
>>54065924
No. I'm just confused. Someone says that I should start with C and java is bad, someone else says that I should start with python.
>>
>>54065950
>SDL, the standard for gamedev
you're even worse than that !nV faggot
>>
>>54065946
>>54065947
That's one of the things I hate about these sorts of arguments. OOP isn't even well-defined. There are all sorts of things that different people tout as OOP, but it's certainly a lot more than just a layer over structs.
>>
Hai /dpt/

I'm curious as to what you guys use to code. Laptops with single/multimonitors, a bigass desktop?

Also, what's the comfiest resolution for you (and screen inches)?
>>
>>54064432
>For the beginner, this quickly becomes a crutch because you never learn to do anything but glue together other people's libraries without ever learning how to implement them and improve them.
Who cares? If you can make money doing that, then why even bother going deeper=?
>>
>>54065953
literally start with java

https://docs.oracle.com/javase/tutorial/

whatever you do, don't start with python at least
>>
>>54065953
Java is absolutely horrible, do not listen to anyone shilling Java. There's probably 1 or 2 guys max. Java could have worse performance, but it's not the end of the world.

Python is not a good language and the arguments for it are completely hollow. Python users will say "good for prototyping", "good for academia", "good for learning". None of these are true and are based on the flimsiest of evidence.

C is really outdated.
>>
>>54065984
>Python is not a good language
Not true and based on the flimsiest of evidence
>>
>>54065984
Wew lad. Are you a lispfag?
>>
>>54065982
>>54065984
;_;
>>
>>54065984
>C is really outdated.
C was updated only 5 years ago.
>>
>>54065984
>There's probably 1 or 2 guys max
www.tiobe.com/index.php/content/paperinfo/tpci/index.html
>>
>>54066000
Doesn't mention /dpt/ anywhere
>>
>>54065998
>>>54065982 (You)
>>>54065984
the other guy is saying that all three are bad, with no alternative suggestion. i'm giving you the "least bad" option, especially for a beginner
>>
>>54065969
Not any of those you're replying to

While the whole structs and layers thing does bear some resemblance to OOP, I agree that people should never be taught OOP like that, it just makes for really messy learning.

Just use the fucking concepts, everything is an object with attributes, and objects can be parents or children of other objects, which means they get to share some of the attributes, that's it
>>
>>54066010
Java is the most bad, you donkey
>>
>>54065998
Start with anything and don't stop with just one language. Eventually you'll find a favorite language and will be able to shitpost about it here
>>
>>54066025
nice meme
>>
File: proving my point.png (36 KB, 1288x374) Image search: [Google]
proving my point.png
36 KB, 1288x374
>>54066000
In the thread, obviously India has a really high population density

>>54065999
I mean more along the lines of lacking high level features you'd expect from a modern language

>>54065995
No

>>54065994
>no inherent static typing
>slow as fuck, inb4 "muh fast (C) libraries"
>tries to do everything, fails
>horrible syntax

>>54066010
C would be the best of the three in question, but I'd recommend doing C# or C++ instead
>>
File: JZB0U0Y.jpg (120 KB, 612x612) Image search: [Google]
JZB0U0Y.jpg
120 KB, 612x612
>>54065294
Please, don't bully.

>>54065268
Same as
 p == static_cast<T *>(0)


In both C and C++, the value/address 0 is not necessary a null pointer but (type*)0 must return a null pointer.

>>54065261
How so ?

!p is same as p == 0
!!p is same as (p == 0) == 0
!!!p is ...

>>54065874
A program that retrieve time/date from internet
>>
>>54066014
It's 2016, nobody uses inheritance over composition grandpa
>>
I know you'll hate this questions guys, but I'm stuck in a job I really hate and I'm looking to get into programming for that reason.

My question is the following. If, in 2016, you had to pick a language/framework to get from zero to employable as a freelancer, what would it be?

I live in a rather cheap country so even if I made $10k a year would be enough to quit my current job.

(It wouldn't be from zero really, I already understand concepts such as for loops, pointers, what "object oriented" means etc. when I was a kid I learned Pascal and even won some national tournaments for young programmers)

I'm thinking Ruby+Rails would be one option, another is just going full Javascript and node JS

inb4 "money is not a good motivation"

Yeah it is.

For me it is.
>>
>>54066030
anything except for python, lisp, haskell or anything with dynamic typing
Thread replies: 255
Thread images: 40

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.