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

/dpt/ - Daily Programming Thread

This is a blue board which means that it's for everybody (Safe For Work content only). If you see any adult content, please report it.

Thread replies: 314
Thread images: 32

File: DPT.png (389KB, 934x1000px) Image search: [Google]
DPT.png
389KB, 934x1000px
Old thread: >>56040962

What are you working on /g/?
>>
>>56044388
thank you for not posting a fag thread
>>
C#
>>
>>56044388
FIRST for Lua
>>
First for asm
>>
First for D

>>56044409
>>56044410
Sorry guys but CNN have officially revealed that ironic "first for _" posting in /dpt/ is no longer funny
>>
C++ is a meme
>>
What has damaged programming the most out of all the OOP languages?
Smalltalk, Java, ...?
>>
friendly reminder that category theory and """purity""" are not silver bullets against shitty software

do not worship these false gods
>>
>>56044442
C++, it was the first mainstream one

OOP has set programming back by decades
>>
>>56044452
agreed. They are mathematical tools, not magic spells.
>>
>>56044452
Patronizing reminder that types prove universal properties about code, whereas tests only prove existential properties.
>>
File: anime_pepe.png (1MB, 1081x945px) Image search: [Google]
anime_pepe.png
1MB, 1081x945px
My first script in Ahk-retrieves a specified file list, takes a screeny of said file, saves it, and loops back to do it for the rest of the 300 some labels I need a screenshot of.

I already feel like Mr Robot Famalam
>>
>>56044467
good point
>>
>>56044483
>Ahk
auto hot key?
>>
>>56044494
Yeah.
>>
>>56044454
aha here we go again. I wonder if you actually know what you're talking about, or if you're just parroting "OOP BAD, OOP BAD" to be edgy and different.

>i'm not like other programmers
>>
>>56044467
http://joyful.com/blog/2015-04-20-ssh-darcs-hub-vulnerability.html
>>
>>56044506
OOP encourages shared state.
I don't know how any retard could possibly argue FOR shared state.
>>
>>56044519
I didn't say types obviate the need for tests.
>>
>>56044527
>OOP encourages shared state.
the complete opposite you fucking retard, it encourages encapsulation of state
>>
>>56044547
And then you pass that state around and encourage mutation of it. A recipe for disaster.
>>
>>56044547
>the complete opposite of shared state
>encapsulation of shared state

b-but that's worse senpai
>>
>>56044527
>OOP encourages shared state.
pajeet of the thread award goes to this anon
>>
File: codeforces-telegram-square.png (4KB, 300x300px) Image search: [Google]
codeforces-telegram-square.png
4KB, 300x300px
drop your codeforces handle
>>
>>56044537
types don't do anything put prevent the most basic retard-tier errors and enable autists to sit around and jerk off all day
>>
>>56044547
Encapsulating state doesn't stop it from being shared.
Whenever you call a method on an object, you are indirectly modifying their state. If two or more objects modify the state of another object, there is shared state.
Encapsulating state like that is fundamentally flawed.
The better solution to is minimise the amount of state you have in the first place.
>>
>>56044589
sort :: a -> array a -> { x : array a | isSorted x }
>>
>>56044590
KILL YOURSELF YOU ARE FUCKING RETARDED AND I'M NOT GOING TO WASTE MY TIME ON YOU, JUST SAYING YOU'RE A PATHETIC IDIOT
>>
>>56044567
>>56044601
(You) clearly don't know anything.
>>
>>56044589
If you're using Java's type system, maybe.

Even Haskell's type system is quite limited.
>>
>>56044597
nice gobbledygook idiot
>>
>>56044597
Why do you need an initial a?
>>
Are Haskell programmers TOO smart to be employed?
>>
>>56044589
They also enable better tooling in general, eg. autocompletion and refactoring, which is desirable when you're working on large codebases that actually do things.
>>
>>56044646
a is a parameter that's a type

it's the same as
sort :: forall a. array a -> { x : array a | isSorted x }
>>
>>56044678
I dunno, but the first thing I do on any project is implement a Haskell interpreter
>>
>>56044701
I see, the previous notation was ambiguous to me

Don't you need an Ord instance for it, though?
>>
>>56044701
Define isSorted formally: I'm genuinely curious
>>
>>56044786
isSorted (x:y:xs) = (x >= y) && (isSorted (y:ys))
isSorted _ = True
>>
>>56044808
*y:xs
this is descending order, would want <= for ascending, that would make more sense
>>
>>56044808
Yeah nice, nice
>>
>I'll just write everything by myself!
>I don't need pajeet shit like static analysis to hold my hand!
>both the design and implementation will be wholly correct the first time!
>it'll be purely functional and every line will bleed elegance!
/dpt/ - Opinionated Undergrads
>>
>>56044731
well it's not haskell it's some ambiguous dependently typed language, it might not even have type classes

maybe something like

sort :: (a : ord) -> array a -> { x : array a | isSorted x }
>>
>>56044684
>which is desirable when you're working on large codebases that actually do things.
oh so nothing haskell is used in.
>>
I need a project. Something impressive and something that will take my skills from mediocre at best to where they should be as a senior software engineering student.

The most complicated piece of software I ever wrote was a simple calculator, just to give an indication of how shit my skills are. I'm OK in both C and Java and that is about it.
>>
>>56044934
Bitcoin wallet.
>>
>>56044934
>senior _ student
>>
>>56044934
Write 2d game using lwgj and implement proper physics and for bonus isometric 3d
>>
File: fwNkD2t.jpg (18KB, 413x395px) Image search: [Google]
fwNkD2t.jpg
18KB, 413x395px
>>56044904
>>
>>56044904
I like Haskell but I also like this joke

>>56044969
>reddit filename
>>
>>56044934
you're a senior and the best you've done is a fucking calculator

please tell me this isn't real.
>>
>>56044987
>C and Java
I don't blame him
>>
>>56044987
but white man san in pajeet land schools not be that good
>>
>>56044997
my school taught Java and C (among others) and there was no way to graduate without having done something greater than a calc. the fuck bumfuck school did this nigger go to?
>>
>>56044946
oh my fucking god, this again. I don't fancy myself as some le epic software engineer man. Most in my program do not. it's just what my major is titled "Software Engineering".

I know, I know, we're not "real engineers". We don't hold a candle to "real engineers". It would probably be better named "Software Development" or maybe "Applied Computer Science"? I don't even know. All I do know is it's supposed to prepare me for a career in software development.
>>
>>56044346
#include <stdio.h>

int main() {

int number;

for (number = 1; number <= 100; number++) {
if (number % 15 == 0){
printf("printf(\"fizzbuzz\");\n");
}
else if (number % 3 == 0) {
printf("printf(\"fizz\");\n");
}
else if (number % 5 == 0) {
printf("printf(\"buzz\");\n");
}
if (number % 3 && number % 5 != 0) {
printf("printf(\"%d\");\n", number);
}
}
return 0;
}

Optimised shit code. :^)
>>
>>56045095
>optimised
why didn't you join all the strings?
>>
>>56045095

there improved your fizzbuzz
++++++++++[>++++++++++<-]>>++++++++++>->>>>>>>>>>>>>>>>-->+++++++[->++
++++++++<]>[->+>+>+>+<<<<]+++>>+++>>>++++++++[-<++++<++++<++++>>>]++++
+[-<++++<++++>>]>>-->++++++[->+++++++++++<]>[->+>+>+>+<<<<]+++++>>+>++
++++>++++++>++++++++[-<++++<++++<++++>>>]++++++[-<+++<+++<+++>>>]>>-->
---+[-<+]-<[+[->+]-<<->>>+>[-]++[-->++]-->+++[---++[--<++]---->>-<+>[+
+++[----<++++]--[>]++[-->++]--<]>++[--+[-<+]->>[-]+++++[---->++++]-->[
->+<]>>[.>]++[-->++]]-->+++]---+[-<+]->>-[+>>>+[-<+]->>>++++++++++<<[-
>+>-[>+>>]>[+[-<+>]>+>>]<<<<<<]>>[-]>>>++++++++++<[->-[>+>>]>[+[-<+>]>
+>>]<<<<<]>[-]>>[>++++++[-<++++++++>]<.<<+>+>[-]]<[<[->-<]++++++[->+++
+++++<]>.[-]]<<++++++[-<++++++++>]<.[-]<<[-<+>]+[-<+]->>]+[-]<<<.>>>+[
-<+]-<<]
>>
>>56044409
I love lua. That's where I started my programming career was making WoW addons lol. What ya doing with lua?
>>
>>56044987
My problem is for years now I've neglected to do much of anything during my breaks / outside of class. most always tend to start something, but then give up at the first sign of difficulty / confusion.

I made a calculator for one of my classes in my sophomore year. Other projects have been: multi-threaded scheduler, shell emulator in operating systems, "aliens vs humans", a simple game, in my design patterns class, implementations of sorting algorithms in my algorithms class

...and that's about it. I still have an entire year left of 400 level courses, so hopefully I'll get to work on something truly interesting / challenging
>>
>>56045095
so shitty i don't even want to complete this
(function() {
function FizzBuzz(length, bool, map){
this.length = length;
this.bool = bool;
this.map = map;
};
FizzBuzz.prototype.fizzbuzz = function(){
console.log(
Array.apply(
null, new Array(this.length)).map(
Number.call, Number).map(
if (this.bool) {
var mapper = '';
this.map.forEach(function(value, key){
mapper += '(++a%' + key + '?'':' + value + ')+'
});
eval(mapper.split('').pop().join('').replace(/^/,"a=>") += "||a.join('\n')")
} else {

}
//a => (++a%3?'':'Fizz')+(a%5?'':'Buzz')||a).join('\n')
)};})();
var FizzBuzzer = new FizzBuzz(100, true, new Map([[3, Fizz], [5, Buzz], [7, Woof]]));
FizzBuzzer.fizzbuzz();
>>
>>56044409
lua is love, lua is life
>>
>>56045142
>Javascript: basically Lisp

Lisp fags on suicide watch
>>
>>56045133
Sounds like an average CS student to be honest.
>>
>>56045133
Fuck classes dude, go around town and talk to local business and talk to them. See if you can solve some technical problems people are having. Make a few websites for mom and pop restaurants and just put their hours/menu online or fix some of their computers.
>>
File: 1470515830827.png (89KB, 450x377px) Image search: [Google]
1470515830827.png
89KB, 450x377px
>>56045167
>talk to them twice

i think i'm the one with autism nvm
>>
>>56044483
When you start using neat tools like Greenshot along with ahk it's pretty awesome.
Effectively region of the screen capture.

And it's like 2 mouse positions and 2 clicks/presses.
>>
How do i learn to make code go fast?
Beginners guide to optimizing something basically. Assume algorithmic optimization is done of course.
>>
>>56045199
go read book on algorithms and datastructures first, then stop coding performance code in python
>>
>>56044934
>impressive
For non- programmers?
Write a GUI interface for a neat CLI tool. Something like youtube-dl and https://libav.org/.

I recommend using C and imgui. It's really neat. And it allows you to focus on the things that people often lack. Things like exporting a youtube clip to a nicely sized gif/webm file.

It shouldn't be too hard. But if you ever struggle with libav you can just use ffmpeg and call that instead.
>>
>>56045221
>go read book on algorithms and datastructures first
Yeah I already have. What kind of fucking suggestion is this though? I told you algorithmic optimization is already done.

Are you basically saying 'I don't know'? Because it sounds like it.
>>
>>56045159
yeah, pretty much. I really don't deserve to have gotten as far as I've gotten. I've got a plethora of mental issues on top of being just truly mediocre and I can't ever imagine being an actual software developer. I browse /dpt/ all the time, and wonder if I could join in more often, had I applied myself, had I dealt with my borderline autism / crippling depression years ago before entering the program. or maybe I was doomed from the start, and I've always been destined to stock shelves.

sad thing is, I'm actually mid-range in my department. I know plenty of dudes in way worse shape than me. I remember last semester a senior had no idea what a regular expression was, hadn't even heard of the concept. This same guy could barely use a terminal and had no idea how to write a makefile. There was this other guy I was paired with in OS class, and he was a senior at the time. I remember writing 99% of the code for our various weekly labs because he struggled with even basic shit like switch statements and pointers in C.
>>
Ramping up on a service that agregates 6 different backends, and provides a clean rest api for consumers.

Enterprise java project, 600+ devs, spring mostly.
>>
>>56045095
#include <stdio.h>

int main() {

int number;

printf("#include <stdio.h>\n\nint main() {\n\n");

for (number = 1; number <= 100; number++) {
printf("\t");
if (number % 15 == 0){
printf("printf(\"fizzbuzz\");\n");
}
else if (number % 3 == 0) {
printf("printf(\"fizz\");\n");
}
else if (number % 5 == 0) {
printf("printf(\"buzz\");\n");
}
if (number % 3 && number % 5 != 0) {
printf("printf(\"%d\");\n", number);
}
}
printf("}\n");
return 0;
}

There, a shittier code to make a shitty fizzbuzz.
How would you worsen the fizzbuzz inside the program even more without overcomplicating it?
>>
File: or600.jpg (205KB, 600x600px) Image search: [Google]
or600.jpg
205KB, 600x600px
C++ fags WILL unironically defend this.

#include <iostream>

class Foo
{
public:
Foo() {
std::cout << "guess the outpu" << std::endl;
}
};

int main()
{
Foo bar();
}
>>
>>56045342
defend what?
>>
The CodeFag's Lamment

<code>a b = c;</code>

In C it depends on what <code>a</code> and <code>c</code> means.

In C++ it depends on wtf <code>=</code> means...
>>
>>56045133
>I still have an entire year left of 400 level courses, so hopefully I'll get to work on something truly interesting / challenging
don't get your hopes up, it'll be mostly the same shit
>>
>>56045364
thats why everybody should program in their spare time. University is here to provide general background and introduce you to concepts you otherwise might not have known even exist.

You learn to swing a hammer by swinging it, you cant read about it
>>
>>56045280
You're making excuses for yourself to be mediocre instead of just improving.
>>
File: Capture.png (14KB, 427x328px) Image search: [Google]
Capture.png
14KB, 427x328px
#include <stdio.h>
#include <ctype.h>

int main()
{
char pass[20];
int checkUpper, checkNum, checkDollar;

printf("Please enter a password \n");
scanf_s("%s", pass, 20);

for (int i = 0; i < sizeof(pass); i++) {

if (isupper(pass[i])) {
checkUpper = 1;
}
}

for (int i = 0; i < sizeof(pass); i++) {

if (isdigit(pass[i])) {
checkNum = 1;
}
}

for (int i = 0; i < sizeof(pass); i++) {

if (pass[i] == '$') {
checkDollar = 1;
}
}

if (checkUpper == 1 && checkDollar == 1 && checkNum == 1) {
printf("That is an acceptable password. \n");
}
else {
printf("That is not an acceptable password. \n");
}

return 0;
}


This keeps crashing for some reason if I try to populate the char array with user input, but if I just do
char pass[] = "Ding$dong1";
and don't take input it works fine.
>>
Nothing wrong with OOP... try writing everything in assembler and get back to me in 15yrs... when your app is ready for sale!
>>
>>56045342
this should not compile
>>
python my dudes
>>
>>56045307
Is anyone in /g/ that actually works at a company, and is not a student/basement dweller?
>>
>>56045395
Your error called... it said "You had me at char *"...
>>
>>56045444
What you wanna know?
About the coffee or the donuts?
>>
>>56045133
LMFAO ALIENS VS HUMANS PLEASE TELL ME THIS ISN'T 5912
>>
>>56045307
>Enterprise project, 600+ devs
would like to see some pytards try this with python
>>
>>56045449
What?
>>
>>56045472
Was just wondering what /g/ think about huge projects.

I feel like there are no actual coding challenges, other than handling tons of unskilled idiot devs that are in your team, and having a "hard" time coming up with a proper architecture.

I miss having coding challenges, since my work mostly consists of tackling architectural/soft skill/clean code/performance ones.
>>
File: I8QlqUVh.jpg (114KB, 1252x1252px) Image search: [Google]
I8QlqUVh.jpg
114KB, 1252x1252px
>get new job
>one of the employees finds out i have a degree
>he asks me for my school
>he starts questioning whether it's a state school in order to invalidate my degree

Why are programmers so mean
>>
>>56045519
he just wants an explanation for why you're so shit
>>
>>56045514
That's why most software development is done in India... they're used to being bored while wading through hip deep shit...
>>
>>56045358
What do you think it will print out?

>>56045418
It does.
>>
>>56045519
Insecurity. The only people that care about this shit are insecure cucks that have been fooled by the system to think a name means anything.

Although one could probably argue that the only people that say it doesn't matter are those that couldn't get into """"top""" schools. Catch 22 tbqhwy senpai.
>>
>>56045418
While I agree that C++ code should never compile as it's an abomination that should be undone.

What's wrong with that code? No explicit return in main is a problem but it compiles.
>>
>>56045519
Only the fittest survive the code jungle...
>>
>>56045541
I, i didnt even start coding tho
>>
>>56045600
probably insecurity or he was just making small talk to try to befriend you
>>
>>56045580
Well I got into the top schools here (Chalmers Sweden) and I can say it doesn't matter from my perspective. But I imagine it's different in the US. I can't really see how though. It makes very little sense to me to judge performance based on the brand of the place you were tested at.

It's not like there's any good software development schools anyhow.
>>
>>56045584
>>56045584
problem is be Foo bar(); you cant create class with brackets like that if you dont put any arguments, this should be not compile at all, but it compiles, program doesnt work because of that
>>
>>56045629
Everything of value in software development you teach yourself... by doing it.

Most folks in the "industry" can talk a damn good piece of software... but can't code for shit.

Surround yourself with tards so you get an easy ride, don't have to take the blame, have easy victims lined up to point at and then do as you please.

Works unless your boss is a woman...
>>
>>56045483
>>56045133
anon pls I just want to confirm your identity I come in peace
>>
>>56045610
This, programmers are socially awkward remember. They dont always know how to communicate well.
>>
>>56045395
1. Initialize your check* variables to zero.
2. scanf's first parameter should be %20s
3. Do your checks in one loop.
>>
>>56045199
>>56045221
>>56045275
Really? Nobody?
God damn. Is it really that kind of inaccessible knowledge?
>>
>>56045629
Ivy league schools are for networking if youre there for an undergrad.
>>
What happened to the HoloLens Fag?
>>
>>56045693
5912?

No idea what that is.

We basically learned a new design pattern each week, and built more functionality using that design pattern to help guide us. example - first week was strategy pattern, so we built generic aliens and humans and used strategy to give aliens "recovery behaviors".
>>
>>56045734
Design patterns are snake oil
>>
>>56045652
this has been fixed in c++1xyzabcdefghijklmnopqrstuvw or another one
>>
If i compile something with this line of code:

g++ -std=c++0x main.cpp && .a.out

What would my Makefile have to look like to compile this? My Makefile currently looks like this:
CXX = g++
SRCS = main.cpp
HEADERS =
OBJS = main.o
output: ${OBJS} ${HEADERS}
${CXX} ${OBJS} -o outut
${OBJS}: ${SRCS}
${CXX} -c $(@:.o=.cpp)
clean: rm -f *.o output
>>
File: yeahhh.gif (436KB, 500x500px) Image search: [Google]
yeahhh.gif
436KB, 500x500px
Is it a bad idea to write an imageboard software with sqlite?
>>
>>56045742
maybe, i remember doing this in vs2008 or 2010 and there were problems with this, so what exactly did they fix? if i try to use some member function from class declared like that i get compile error
request for member 'func' in 'bar', which is of non-class type 'Foo()'
>>
>>56045812
No, probably wont matter if its small time.

You should just make it not depend on a specific db and make it so you could easiky change to another if needed.
>>
>>56045395
#include <stdio.h>
#include <ctype.h>

int main()
{
char pass[20];
int i,checkUpper, checkNum, checkDollar;

printf("Please enter a password \n");
scanf("%s", pass);

for (i = 0; pass[i]; i++)
if (isupper(pass[i]))
checkUpper = 1;
break;

for (i = 0; pass[i]; i++)
if (isdigit(pass[i]))
checkNum = 1;
break;

for (i = 0; i < pass[i]; i++)
if (pass[i] == '$')
checkDollar = 1;
break;

if (checkUpper && checkDollar && checkNum)
printf("That is an acceptable password. \n");
else
printf("That is not an acceptable password. \n");

return 0;
}
>>
>>56045739
kind of true I guess. A lot of students learn about them and think that they have to design software systems by putting together different patterns like a puzzle. they're not meant to be spammed left an d right in software design; not meant to be used in that way. I think they're meant to evolve naturally as you build the system.

Also, they are used to communicate with other developers more easily.
>>
>>56045789
> Year of our Lord 2016
> Writing your own Makefiles
>>
>>56045838
> Year of our Lord 2016
> Not writing your own Makefiles
>>
>>56045838
>Year of our Lord
>2016
yeah no, maybe next year lordfags
>>
>>56045831
All db bindings consist of compiling a SQL statement to bytecode and then stepping through it until it's done, right?
>>
>>56045885
Making prepared statements to pull information or insert? Yes.
>>
>>56045031
Why do you feel the need to be subservient to elitist neckbeards?
>>
>>56044589
sounds like most unit tests
>>
How do I make a python program use python 3 instead of 2.7 as default. I already tried changing the path in regedit and manually(open with...) it keeps popping in 2.7
>>
>>56045961
?

elaborate fool
>>
File: degenerate.png (86KB, 322x386px) Image search: [Google]
degenerate.png
86KB, 322x386px
Exokernel for ARM64
>>
>>56045701
still doesn't work.
>>
>>56046016
see >>56045832
>>
>>56046001
You wrote a whole paragraph to try and save face after receiving a two-word meaningless quip from a guy who just finished cleaning up after fapping to loli.
>>
File: 1470232844052s.jpg (4KB, 117x125px) Image search: [Google]
1470232844052s.jpg
4KB, 117x125px
>>56045742
ok, ive found it you faggot

Test t;      // create a Test called t
Test t(); // declare a function called t which returns a Test


http://stackoverflow.com/a/620149
not sure how much accurate it is tho
>>
>>56045629
Most of the students with nearly perfect grades from local community colleges fail out of their first year of the university I attended.

They front-load some very difficult classes to weed out those who aren't going to make it in the 400-level classes later.

There is a massive difference in quality among colleges and universities in the US.
>>
>>56046082
how does community college in america works?

you go to community college first, and only then you go to a real college?

?
>>
>>56045885
>All db bindings consist of compiling a SQL statement to bytecode and then stepping through it until it's done, right?
There are massive differences in syntax among DBMS's, as well as difference ODBC drivers required to interface with them.

That's why you model the data within the application and abstract out methods that can send the same concept to different database tools.
>>
>>56046033
I think it's not working because of the VS compiler. I just tried in gcc and it works perfectly as I had it.
>>
File: Okinawan C++ Programmer.jpg (621KB, 1280x1449px) Image search: [Google]
Okinawan C++ Programmer.jpg
621KB, 1280x1449px
>>56045275
Learn about the hardware tbhq, like why it is faster to sum all ints < c in a sorted array vs a unsorted array
>>
>>56046113
Not really.

Community colleges are generally for shorter two-year degrees, while universities are for those pursuing a more involved field.

That being said, many people who don't get accepted in the university of their choice use a local community college as a stepping stone to try to prove that they can make good grades outside of high-school. Some universities even have arrangements with specific community colleges to choose from their students, and in return, they help guide the curriculum of basic disciplines (basic math, science, literature, etc.).
>>
Lua or Scheme for an embedded scripting language?
>>
Why do people use NoSQL even when they want a relational database?

http://stackoverflow.com/questions/2350495/how-do-i-perform-the-sql-join-equivalent-in-mongodb
>>
>>56046160
>lua
>index starts at 1
>>
>>56046172
Memes
>>
>>56044442
Android programming especially.
I still have nightmares
>>
>>56046121
moar of this slut
>>
>>56046160
Guile
>>
>>56044597
>sorting lists of elements of incomparable types
>>
>>56046185
why? is android difficult? where did you learn?
>>
>>56046192
Isn't it very big?
>>
>>56046215
It is typical overengineered Java shit
>>
>>56046217
for you
>>
File: gun2.jpg (19KB, 241x382px) Image search: [Google]
gun2.jpg
19KB, 241x382px
>>56046187
>slut
>>
>>56046233
But I mean, guile is several megabytes last I heard, whereas Lua is 300kb
>>
C# or Java for writing servers?
>>
> What are you working on /g/?

Got my head around C pointer basics. I just want to hurry through the learning process so I can start doing graphical stuff.
>>
>>56046248
Hasklel
>>
Reimplementing .net's system.io to use a mysql db as the storage medium.
>>
>>56046248
Cava
>>
File: 1463338301974.png (371KB, 800x600px) Image search: [Google]
1463338301974.png
371KB, 800x600px
>java programmers
>>
>>56046244
>several megabytes
who cares? we have terabyte drives
>>
>>56046160
Wren
>>
>>56046278
I care, I want to save bandwidth
>>
>>56046248
D
>>
the fucking weather channel app. fucking yawn
>>
>>56046215
>>56046228
This. Android isn't difficult unless you actually care about making an app that performs well and doesn't look like shit. The inheritance alone is enough to make a man weep.
>>
>>56046172
NoSQL != MongoDB. Mogo is simply the most marketed one, so lots of retards fall for it. There are actually good NoSQL DMS like RethinkDB, CouchDB and Riak.
>>
>>56046248
>writing servers
If you would kindly explain what the fuck you mean by this, we could better help you.
>>
>>56046248
Go.
>>
>>56046296
what did you mean by this?
>>
>>56046308
Yeah, but why use NoSQL when you want to use joins?
>>
>>56046286
Looks interesting! Will check it out, thanks anon
>>
>>56046326
Some of them have joins too.
>>
>>56046318
Handles network requests from clients

>>56046320
Rust is what Go should've been
>>
>2016 not using Go
its the best thing that happen to programmers since C.

/thread
>>
>>56046323
I am working on The Weather Channel's iOS app. That is what I meant by it. When I said
>fucking yawn
I meant that I am bored
>>
>>56046342
>what is jquery
>>
>>56046344
should you even bother learning iOS , if you don't a iphone or a mac?
>>
>>56046340
Both languages would work just fine for this.
>>
>>56046248
Out of those two, Java. Because C# sucks ass on Linux and Windows sucks ass for servers.

Outside those selections, Python doing the heavy work, Node and express handling the front facing aspects with socketcluster passing data.
>>
I have been looking up a lot of documentation and learning how to do various useful things, and I can see how they can be strung together to make something useful, but I never get around to actually doing that.
>>
>>56046333
I think anon means why use an non relational database when you have relational data.
>>
>>56046361
No. Macs are essential to writing iOS and OS X apps. There's talk of Google's Android adopting Swift but who cares.

I learned Android once I learned I needed a fucking mac to write iOS. Then I got hired as an iOS dev after making an Android app. Life is weird.
>>
>>56046358
javascript is not programming, you moron
>>
>>56046404
how cum?
>>
>>56046332
The embedding C API docs seem to be still lacking right now...
You should be able learn basic usage from /test folder and /src/include/wren.h
>>
>>56046404
Neither is C past 1978. Nowadays C is dickwaving and completely unrelated to coding.
>>
>>56046404
Sure it is. You can even go so far as to say html is a programming language. You use the language to accomplish a computational task.
>>
>>56046447
html is a *markup* language, george
>>
>>56046404
Nah, you're a cunt.

I hate Javascript, but my hatred does not blind me to objective fact.

Javascript is a programming language.
>>
>>56046414
>>56046447
ok i lost
>>
>>56046447
Nope. If you ain't dealing with any memory allocation or deallocation AND you can't make ANYTHING private, it's not programming. It's fucking scripting or shitty web devs ZZZZ
>>
>>56046460
It's Turing complete
>>
>>56046471
>he doesn't know about static functions and variables
>>
Are any of you even employed engineers? Or are you all wannabe undergrads LMFAO
>>
>>56046340
>Rust is what Go should've been
Are you fucking retarded? Rust and Go are completely different down to their prime principle. Rust follows the C++ creed of zero cost abstraction. It favours decrease in complexity only if it has zero or near zero impact on performance. This results in a more complex language to facilitate this lower level of abstraction. Still less complex than C++ of course. Go on the other hand purposefully simplifies the language at the cost of a higher level of abstraction and lesser performance. Essentially it can be viewed as a middle ground between C and Python/Java/etc. Apples and oranges, retard.

>>56046391
I'm sorry if I did not not make that clear. They are retards and easily fall for aggressive snake oil panacea marketing, trends, etc. They are told that NoSQL is better in all respects and believe it. The concept of using the best tool for the job evades their comprehension.
>>
>>56046493
i'm CEO of a fortune 500 company
>>
>>56046493
>Are any of you even employed engineers?
Yes.
>>
>>56046549
Proof?
>>
File: smugfrog.jpg (27KB, 600x600px) Image search: [Google]
smugfrog.jpg
27KB, 600x600px
Any of you niggers like implementing numerical methods?

>mfw implementing a Riemann sum integration method
>>
HEY I HAVE A QUESTION, employed people only thanks

Do you guys actually work? I work on a system with 3 mil + people using it every month and I serioulsy dont do shit. I bullshit my standups every morning and maybe do 3 hours of work over the entire week. I play video games and nap and shit and do bare minimum.

am I a shit person or am I doing what most of us are doing and capitalizing off of you over-working autists that dont get raises and promotions from overworking yourselves lel
>>
>>56046560
believe me
>>
>>56046580
I definitely work in bursts. Some weeks I'm hyper-productive, others I might barely do 10 hours of work.
>>
>>56046580
>am I a shit person
When you know the rules so well, you can break them.

Congrats.
>>
>>56044388

multi matrix grid search. fucking run time.
>>
>>56046579
dumb frog poster
>>
>>56046580
same as >>56046620

Sometimes I'm a fucking wizard, kicking ass and producing functionality.

Sometimes I'm coasting and stay drunk at the office for the better part of the week.
>>
>>56046580
Most of the time it's spent just talking to the guy I'm working for, he seems to change his mind every fucking mind.
>>
>>56046248
java
>>
minimize state
encapsulate necessary state
>>
>>56046580
>being a wagecuck
>>
>>56046676
ah I am >>56046580

I was talking to a former co-worker and we're fairly convinced most people just don't work very much in this industry. Almost like it's an unspoken thing. I'll hear coworkers in standup say they're still working on some shit that I KNOW should only take a couple hours, THEY KNOW it should only take a couple hours, but those dumbass project managers with no tech experience HAVE NO IDEA how long ANYTHING should take.
>>
>>56046688
seize the means of production

do it now
>>
>>56044431

kinda but thats why I love it

you dont like memes? who the fuck are you
>>
>>56046688
this, the anti-OOP memer from before was fucking retarded, minimizing state and encapsulating the state that you do have aren't mutually exclusive
>>
>>56044555

>encourage

um, what?
>>
>>56046697
>former co-worker
>former
I wonder why.
>>
>>56046697
>but those dumbass project managers with no tech experience HAVE NO IDEA how long ANYTHING should take
That's the crux of it.

We decided we needed a little automation tool to monitor something specific and toss out emails if anything goes wrong.

I told them it would take about a week. The cunts don't know a first iteration would take me less than an hour or two.
>>
>>56046735
he dipped out of his very first job making 55k to work at some place in CO making 85k after like 7 months lel. apparently he does nothing there either
>>
Is the "make your code indecipherable so your working place is dependent on you" meme real?
>>
>>56046697
that's why if you're any good you should start your own company instead of just wasting your time to get a mediocre salary, you can get a lot of shit done on your own and it benefits you directly
>>
>>56046777
Actually sort of. but it may not end up in your favor. One guy helped us write a mapping SDK and he did a lot of the C++ portion of it. that dude ended up dedicating some of his weekends to helping us because he left the company shortly after. not sure if he got paid for it though.
>>
>>56046074

Should be Test t{} if you want an object and not a function declaration
>>
>>56046777
Indirectly, yes.

Most of the time, it really just manifests to the fact of "no one else here even knows how to write in Java/C++/C#/Python w/e". That means you're a sysadmin for a mom n pop shop, and as such, you do have some sort of job security.

If you're an actual software development shop and you write unreadable code, guess what? You're fucking fired for wasting everyone's time.
>>
>>56046777
depends on whether there is someone who can stop you in the process
>>
>>56046777
Very real.
>>
How do I store unsigned integers in a database?
Is NUMERIC(10,0) equivalent to a 32-bit uint?
>>
>>56046809
But what if your code is so readable that they don't need someone like you anymore and replace you with Pajeet?
>>
File: Zork_I_box_art[1].jpg (30KB, 300x358px) Image search: [Google]
Zork_I_box_art[1].jpg
30KB, 300x358px
Does anybody have any resources on MUD design?
>>
What's some pajeet tier programming?

>not commenting any code
>not leaving any white lines

Any more?
>>
>>56046874
If your skills are limited to producing code, then you are the Pajeet.

I'm deeply ingrained in major business decisions in my company because I understand the effects it will have on our systems and the effect it will have on our applications, based on how the code is written or will need to be changed to reflect.

If you're an "animal cracker" programmer, then you have no security.

By this, I mean that someone comes along and hands you a cracker and says "Write a method that accepts this and returns this.", and you do that and wait for the next cracker, without serving any other purpose.
>>
>>56046914
I hate it when they don't fucking keep the same style of writing as the rest of the file they're in.

like they'll declare a function, then put the curly on the next line when every other fucking function has it on the same line. they'll use the dumbest ternaries just because it might seem smart. they just wont follow proper coding conventions. they're so bad
>>
>>56046914
>What's some pajeet tier programming?
When your job description is limited to producing code.
>>
File: LET'S DANCE.jpg (29KB, 412x430px) Image search: [Google]
LET'S DANCE.jpg
29KB, 412x430px
Write a function in your favorite language which prints out all nodes of a binary tree without using recursion or a stack in 15 seconds or THIS EAGLE STABS YOU
>>
File: ?.png (7KB, 120x120px) Image search: [Google]
?.png
7KB, 120x120px
Does anyone here have a real job as a programmer?

can you walk me through , what a typical day looks like?

i'm a aspiring programmer and i would like to know what i am in for.

thanks
>>
working on a thing and I need three letter mnemonics for 'head' and 'tail' (in the unix sense of 'first/last n things', not in the lispy car/cdr sense). any suggestions?
>>
>>56047010
I developed some things in >VBA as a summer job, does that count?
>>
>>56047003
do I get pointers back to the parent of a node?
>>
>>56047003
>using binary trees
No thanks.

>>56047010
>Does anyone here have a real job as a programmer?
This has been multiple times in this thread. Multiple anons here have jobs programming.

>can you walk me through , what a typical day looks like?
It's different for everyone
For me:
>get to office around 6AM (fuck traffic)
>blast music and dance around the office until other employees arrive
>shitpost on 4chan
>attend morning stand-up ("No news, still working out this little kink...")
>shitpost on 4chan
>work on a design issue for a planned feature
>write no more than 50 lines that will be removed later anyway when I actually figure out how to do it properly
>lunch for an hour. or two. or 4.
>shitpost on 4chan
>leave at 3PM. or sooner, if I feel like it
the next day...
>wake up hung over
>send email to random co-worker saying I'm "working from home"
>shitpost on 4chan all day and play vidya
>>
>>56047003
>store binary tree in an array
>iterate through array
ez
>>
>>56047083
no
you're dead
>>
>>56046943
You're serving the purpose of making working, efficient, optimized, safe, error-proof, module-able, adaptable and readable code.
That is the work of a programmer, which Pajeet can't do half as well.
If you're involved in business decisions you're not a better programmer for it, you're just higher up in the food chain, of course you'd have more job security but that doesn't make the actual programmers dispensable.
>>
>>56046943
this
>>
>>56047003
>eagle
>>
>>56047140
>You're serving the purpose of making working, efficient, optimized, safe, error-proof, module-able, adaptable and readable code.
You realize that Pajeet can do this just fine, right?

None of these are particularly special qualities, and are easily managed by company-wide code policy and toolsets.
>>
>>56047003
If your binary tree is backed by a list or an array, this is pretty fucking simple. If it's defined recursively, this is not very simple.
>>
>>56047010
yea im an ios dev working on a top 5 app this is how my day goes:

>wake up at 10 am
>standup at 10:15
>"hey still working on this bug it's a tricky one"
>it will take like an hour at most i just cant bring myself to do it
>smoke weed
>play dota
>get mad im not a pro vidya game player
>keep slack open to make sure im not needed
>shitpost on reddit
>dick around lookin at memes until 4:20 PM
>IM DONE DOT JPEG
>repeat in the morning
>>
>>56047212
Ah, so that's why all company code I see is literally perfect, utilizing advanced hand-crafted algorithms, concise comments on vague statements (which is surprising considering there aren't vague statements) and design choices made for future implementation at the level of clairvoyance, especially the code made by Pajeets.

Wait, no it's not. It's a fucking mess almost every time.
>>
#include <stdbool.h>

void main(){
char letter = "a";
char letter = letter + 1
return b;


Why won't the letter increment to b?
>>
>>56047404
>"
:^)
>>
On Gentoo, I see a "d" use flag for gcc. Is it what I think it is?
>>
>>56047404
>return b
>>
>>56047003
void traverse(node* root) {
std::queue Q;
Q.push(root);
while (!Q.empty()) {
node* cur = Q.front();
Q.pop();
if (cur == nullptr)
continue;
Q.push(cur->l);
Q.push(cur->r);
std::cout << cur->data << " ";
}
}
>>
>>56047404
am i being le epic trolled
>>
File: 1460612544671.jpg (33KB, 590x394px) Image search: [Google]
1460612544671.jpg
33KB, 590x394px
>>56047404
>return b
>>
>>56047447
>>56047461
???
>>
>>56047511
b was never initialized
>>
>>56047520
he wasn't alone
>>
>>56047550
what
>>
>>56047520
so? it void function can return anything
>>
File: 1459123952651.png (52KB, 203x209px) Image search: [Google]
1459123952651.png
52KB, 203x209px
>>56047557
>void function can return anything
>>
>>56047557
so you're saying I could just type
return cunt;
arbitrarily in any void method and it will compile just fine?
>>
>>56044570
>Programming competitions
Hah, people actually fall for this bullshit.
>>
>>56047611
what do you mean?
>>
>>56047620
If you willingly go to such a social place you literally cannot be a talented programmer. Just telling it how it is.
>>
>>56047676
but you can compete on code forces at home though
>>
>>56046500
>Essentially it can be viewed as a middle ground between C and Python/Java/etc.
https://benchmarksgame.alioth.debian.org/u64q/compare.php?lang=java&lang2=python3
https://benchmarksgame.alioth.debian.org/u64q/go.html

>Apples and oranges, retard.
Indeed!
>>
>>56047714
>a language is only defined by its performance
>>
>>56047698
Competition is a social place, not matter where you physically are.
>>
>>56047016
if 2 chars, hd and tl
>>
Hey guys, I just started learning Python (on Udacity) a couple days ago.

I've got (very) basic C / C++ experience, and the indentation bullshit on Python is turning me off tbqh.

Should I just learn Java instead?
>>
>>56047789
C#, IMO.

It's honestly the best of both worlds with respect to Java and Python.
>>
>>56047787
it's gotta be three unfortunately. I was thinking top and bot but that's not quite right. I wanted to try extending saturn a little since I noticed it was lacking in ways to pull things out of a string. My example program that uses the two instructions I'm implementing:
;reverse a string
main:
str string
int slen
out stdout, 'Please enter a string: '
get string, stdin

chk_zero:
len slen, string
cmp slen, 0
jne out
ext 0

out:
str s, string
tail s, 1 ;need better mnemonic
;is tail even necessary? head with negative arg?
out stdout, s
dec slen
head string, slen ;need better mnemonic
jmp chk_zero

It works with any length instruction name because of how the parsing works, it's just that every other instruction in the language is 3 letters long.
>>
File: Untitled-1.jpg (161KB, 651x574px) Image search: [Google]
Untitled-1.jpg
161KB, 651x574px
>>56047809
Alright fampai, I'm going in
>>
>>56047836
bjb
anl

head = blowjob
tail = anal sex
>>
>>56047856
Make sure to learn basic XAML and MVVM along the way.

Enjoy LINQ whenever possible.

Abuse
using static System.Console;
.

Declare everything with var out of sheer laziness.

Make every single method public and static.
>>
File: Untitled-1.jpg (228KB, 651x574px) Image search: [Google]
Untitled-1.jpg
228KB, 651x574px
>>56047884
Yeah, you lost me, but I'll try to remember that, thanks.
>>
>>56047789
I'd say Java is more useful to know, but you'll definitely want to pick up a scripting language eventually, too. I personally prefer Ruby to Python, because Python's docs are fucking awful.

>>56047809
Don't do this if you're targeting Linux, unless you're fine with second-class language support. Java is unequivocally superior cross-platform, but C# has some niceties that Java is conspicuously missing. They're very similar (C# was borne of MS's efforts to EEE Java), so learning either will help with the other.
>>
File: 1460115987647.png (30KB, 246x200px) Image search: [Google]
1460115987647.png
30KB, 246x200px
>>56047884
Different fag; how the fuck do you get code to hook up with XAML? I want to populate a combobox with values from a sqlite table and there's no solid resource for data binding that isn't as verbose as stuff on MSDN. It doesn't seem so hard in theory since it feels like it would just be equivalent to using a loop to add things to a list/array but this has just been slaying me.
>>
>>56047836
fst and lst
>>
>>56047789
>Should I just learn Java instead?
yes, the only valid reason for learning python is if you're doing web dev
>>
File: 1467818811589.png (29KB, 300x162px) Image search: [Google]
1467818811589.png
29KB, 300x162px
>>56047884
>Make every single method public and static.
What the fuck am I reading?
>>
>>56048034
It was a joke at the propensity for many programmers to just say
>ugh I want to access this from anywhere fuck the consequences

>>56048000
Do you want the quick and dirty or the "proper" way?
>>
>>56048071
The proper way, since I'm going to have to maintain this thing.
>>
>>56047981
>Java is unequivocally superior cross-platform
By what metrics?

There's hardly anything in the entirety of .NET that doesn't work on Linux (except Windows-specific call, of course).
>>
trying to go back through sicp with emacs
I did this a while ago but programming was more of a hobby so I never kept it up so I'm trying to learn again for fun.
However, I cant' recall how I "ran" the various excercises (such as the basic math problems ont he first page) to have an output printed in a buffer. I've tried googling to no avail. I know it's a simple meta-key command and it's driving me mad, anyone know how I did it?
>>
File: image.jpg (41KB, 701x395px) Image search: [Google]
image.jpg
41KB, 701x395px
>>56046424
[spoiler]I started with C
>>
File: Untitled-1.jpg (182KB, 656x595px) Image search: [Google]
Untitled-1.jpg
182KB, 656x595px
>>56047981
>>56048014

Alright, so basically
Java > C# > Ruby > Python

Java it is, then.

Also, where's a good place to learn Java? I don't wanna learn from a fucking pajeet.
>>
>>56048012
thanks that's good
>>
>>56048184
> Java > C#
For masochists, maybe.
>>
>>56048184
>>I don't wanna learn from a fucking pajeet.
>screencap of ProgrammingKnowledge
http://www2.sunysuffolk.edu/tangy/cst112%5CText_book(10th_ed).pdf
>>
>>56048230
nice meme
>>
>>56048184
https://www.youtube.com/playlist?list=PL9DF6E4B45C36D411

seems white
>>
>>56047589
Yes.

https://ideone.com/xVxDNU
>>
>>56048184
>Java > C# > Ruby > Python
no
/dpt/ is not a good place for advice
python and ruby are decent for scripts, cli applications, high level backend dev and decent if you want to start out with a high level language (you should switch to something else once you can handle basic CLI applications and stuff like control flow and functions, though).
mit and many other unis start with python, but quickly transition to other languages.
c# and java are very similar. c# is mostly limited to windows at this point. c#'s strength is backend webdev and windows desktop applications, java's strength is backend webdev and android dev.
many unis transition to c# or java after python for oop fundamentals, many also start with c#/java directly, although there's more "noise" that you might not understand at the start than in python
a low level start or a functional start isn't unthinkable either.
C / assembly -> C++ for a low level start, lisp/haskell for a functional start (lisp especially if you wanna get into ai)
>>
>>56048184
Rather go for scala since it has better syntax + fp and great java interop
>>
File: meh.jpg (87KB, 600x612px)
meh.jpg
87KB, 600x612px
>>56044388

A gigantic ball of C++98 mud.
>>
>>56048279
How exciting, does it roll yet?
>>
>>56046074

A parse most vexing indeed.
>>
File: anal beads.png (9KB, 868x146px)
anal beads.png
9KB, 868x146px
>>56048000
Assuming you already know how to pull in data from the SQLite database, you'd take that data and populate a list of strings or objects containing multiple properties.

Just assign the combobox's ItemSource property to that list:
cboListOfThings.ItemsSource = new List<string>() { "anal beads", "dragon dildo", "fuzzy cuffs" };


If you're expecting the combobox to automatically update based on the underlying data, you need to look up "data binding".
>>
>>56048290

Yes. In fact, its was rolling for a solid 15 years before it ran me over.

I'm literally stuck inside.

Kill me, please.
>>
>>56048344
Damn im sorry man, that must suck °
>>
>>56048145
m-x (shift+alt+x) compile
>>
>>56048370

Whar are you mean with th
>>
>>56048382
whoops typo, nothing haha
>>
File: download (9).jpg (6KB, 259x195px)
download (9).jpg
6KB, 259x195px
>>56044388
(P) HTML or Get out faggots. LOL. Sorry. Tfw you gotta self teach your C average ass Python.. ;( (/p)
>>
>>56048391
haha °
>>
>>56048314
>populate a list of strings
Makes sense. This list specifically isn't going to change much so this seems like the way to go.

>If you're expecting the combobox to automatically update based on the underlying data, you need to look up "data binding".
Yeah, I've been reading about data binding; it's kinda dense reading-wise on MSDN but that wpf-tutorial.com site feels a little too general. Is data binding the "quick and dirty" way?
>>
File: 1470849608085.png (233KB, 520x423px) Image search: [Google]
1470849608085.png
233KB, 520x423px
>>56048279
We're dealing with the same, with the added bonus of also maintaining the legacy Java code it interacts with.

>xdoclets
>JSPs 4000+ lines long
>ant build spread across over 30 XML files, not counting the accompanying properties files
>>
>>56048370

Eh, not really that bad.

Mostly management - Every attempt to refactor any part of the project requires an act of congress to approve.

Also, management likes to 'help' sometimes. At least I get a fresh batch of bugs to distract me whenever they do...
>>
>>56048415
No, data binding is the "proper" way, actually, as is using full MVVM patterns.

The way I showed you isn't "wrong", but it's static in nature which has its downfalls (data doesn't automatically match the underlying objects if they change).

This means that the state of the data object and the state of the GUI element is independent.
>>
NEW THREAD!

>>56048452
>>
>>56048184
if you want to learn something cool, fast, learn Go. fuck everything else
>>
File: lightbeer.jpg (55KB, 625x415px) Image search: [Google]
lightbeer.jpg
55KB, 625x415px
>>56048424

I see singletons. Singletons everywhere. Singletons for timers, filesystem managers, and stupid stdio wrappers.

> they want to make it thread-safe
>>
>>56048483
Singletons are love, singletons are life!
Memory eficient, thread safe, management loves them, they are the best for every situation!
Thread posts: 314
Thread images: 32


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

I'm aware that Imgur.com will stop allowing adult images since 15th of May. I'm taking actions to backup as much data as possible.
Read more on this topic here - https://archived.moe/talk/thread/1694/


If you need a post removed click on it's [Report] button and follow the instruction.
DMCA Content Takedown via dmca.com
All images are hosted on imgur.com.
If you like this website please support us by donating with Bitcoins at 16mKtbZiwW52BLkibtCr8jUg2KVUMTxVQ5
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.
This is a 4chan archive - all of the content originated from that site.
This means that RandomArchive shows their content, archived.
If you need information for a Poster - contact them.