/dpt/ - Daily Programming Thread - Procedural programming edition

What are you working on Sup Forums?

Other urls found in this thread:

wiki.haskell.org/Tutorials
pypi.python.org/pypi/python-libtorrent/
hackage.haskell.org/package/unicode-prelude-0.1.1/docs/Prelude-Unicode.html
twitter.com/SFWRedditImages

First for me

Do you guys like dynamic programming?

It's pretty neat

What are your thoughts on ABAP /dpt/ ?

no

>Procedural programming edition

is this bait

I'm dumb. I won't magically stop being dumb.
Can somebody link me a good guide on this?

>If you shave and wear a suit jacket and shirt I promise you're already above 95% of their candidates. I'm pretty sure that's the only reason I have my job, they even mentioned that others solved their interview test in a much cleaner fashion so I assume the reason they didn't go with those guys is they were neckbeard spergos.

What if the office is business casual? Wear a suit anyway?

Why can't c++ do basic things like average 2 ints?

I always just ask before the interview what they expect me to wear. Sometimes they answer like it's obvious, but different companies expect different things.

What do they generally expect? 99% of the professional devs I see are wearing slacks/khakis and a button-down shirt, is that the norm?

Hehehehehe. I remember that shitstorm.

Even allocating memory is hard with C++.

People will sometimes dress up for interviews even if they don't expect to wear the same outfit during business hours. Not everyone in every field does that.

if(op.image.isNotXKCD() == true)
{
reply("Please post an XKCD image next time");
}

int
avg(int a, int b)
{
if ((a < 0) & (b < 0))
{
return a/2 + b/2 + (a%2 + b%2)/2;
}
return (a+b)/2;
}

if (post.poster.isFaggot() && true)
{
{
reply("faggot");
};
}

dicks :: Integral t => t -> String
dicks n = "8" ++ shaft n ++ "D" where
shaft 0 = []
shaft n = '=' : shaft (n-1)

Maybe yeah. It depends where you apply. I did an interview once at some company that did some kind of business software stuff, i forgot to ask what to wear and dressed smart casual. During the interview everyone dressed smart casual too, but at the end they asked me why I didn't wear a suit. Felt dumb. Didn't get the job.

So yeah. I would just ask if I were you.

I've heard both ways. Here's what I think it *really* boils down to: if you're already in the top couple spots in the candidate list, and you dressed better, they'll tend to chose you.

I've interviewed so many people who come in wearing nice suits and have *no fucking clue* how to program that I'm immediately suspicious when I see one. I'm not being some code snob and saying a guy who doesn't know some arbitrary algorithm off the top of his head sucks, I'm saying guys who literally don't understand how to write a for loop when applying for a C++ position.

Two of the best hires I've ever witnessed showed up in regular jeans and rumpled polo shirts. As far as dress and presentation go, all I care about is whether the guy stinks or has other disgusting hygiene or personal habits (e.g. snorting snot into his throat, coughing or sneezing without regard for others). Just wear clean, presentable clothes (i.e. no pizza grease stains) and I'm set.

That said, a good friend who has worked for many well-respected games companies insisted that wearing a suit gets him jobs. But he's quite literally one of the most intelligent and talented people I know, so I think he's full of shit on the suit thing.

>tfw after fucking seeing all this propaganda about Haskell, I'm actually thinking of learning that meme language.

What's the difference between POP and OOP?

I have two interviews. One is for a small insurance company and one is for a small startup. Both jobs are for mobile dev (junior developer)

should I just ask what to wear or show up in a suit?
>I can't afford a good suit atm

Why don't you use node.js?

no its not

Most software engineers I've worked with wear jeans or shorts and t-shirts. A collar is weird.

The last job I had in San Francisco, a guy at the interview was barefoot. That place was super relaxed. One guy got sent home by HR for ironically wearing 70's short-shorts.

feel free to ask for help

replicate

"user we need to use Spring and JSP because these technologies are stable and well-documented and also I need java as a crutch"
kill me now 2bh

I would suggest wearing a dress shirt, no tie, top button unbuttoned, with dress slacks (flat front, no pleat), a belt, and dress shoes (not high gloss shine). That's your run of the mill "dressed a little nicer than the job should ever require" level.

Personally, I like Express shirts. For pants, look for a wool blend. I don't personally like all-synthetic pants. You should be able to find a decent pair for $20 - $40.

Always dress one level above
If they're in formal suits, you wear a tuxedo

Where is the functional programming paradigm actually used other than posting meme solutions of FizzBuzz?
Not bait, I'm genuinely curious. Also, good resources to start?

I know C, Java, a little C++, Python (but don't know how to do stuff the `Python-way').
Also, I know some basic lambda calculus but I don't know if that'll be useful.
Basically I'm not new to programming so I don't want start from the very basics.

if ((drake is cool == true || true ) && (1

is that one of the annoying ones limited to Int ? I don't want to restrict my dick to only 9223372036854775807.

>tfw overestimated their powerlevel and walked in in a tux and bowtie while the interviewer was wearing a hoodie and shorts

Solution: Stripper tuxedo that you can rip off with one hand with slightly less formal wear beneath it

Don't forget the fedora

Show me how you allocate 3 foo (foo is a class)?

C can do basic math and averaging ints is basic math so C can average two ints. So can C++. The only thing that might not be able to is you, can you user?

Overdressing is way better than underdressing. If a company judges you for overdressing, you shouldn't be there working there IMO.

It's not used in very many places sadly, but it's slowly being worked into imperative languages

wiki.haskell.org/Tutorials

>I know some basic lambda calculus
that's very useful

>a guy at the interview was barefoot
And you didn't turn 360 degrees and walk out?

What anime is this from?

Not sure what you're asking but
vector< foo *> v(3);
for (int i = 0; i < 3; i++) {
v[i] = new foo();
}

Dvangelion

>If a company judges you for overdressing, you shouldn't be there working there IMO.

Dude, companies will judge you for the stupidest shit in the world. Quite literally, most tech interviews boil down to "find any reason to call this guy an idiot" and the criteria for that is generally along the lines of, "is there any single thing I know that he hasn't heard of?"

I'm not kidding about this. Your manager will demand that you write a paragraph explaining why you're rejecting someone. Why? Because they know that 80% of the time it's because they lied about their experience, but the other 19% of the time you're rejecting for something that could cause a lawsuit. Age is a huge one. They need you to find any and all reasons to reject to cover their asses in the event that they're sued.

So, yeah, "bad cultural fit" because you're a try hard who showed up in a suit is most certainly a reason to be eliminated from the candidate pool.

Letter indices.

ive been coding two weeks now i made a reusme script hta applies to tjobs for me.

i want to build a bit torrent client but i have no idea how one works? what is my step how does someone build software that tehy don't know how works?

i started messing with socketsbecause i know network programming is entirely involved.

i started messing with sockets but don't spoil the software for me i want ot figure out just kinda give me motivation ;)

I want to learn java and i'm going with eclipse for an IDE, but there's so many versions.

>Eclipse Neon (4.6)
>Eclipse Mars (4.5)
>Eclipse Luna (4.4)
>Eclipse Kepler (4.3)
>Eclipse Juno (4.2)
>Indigo Packages
>Helios Packages
>Galileo Packages
>Ganymede Packages


Which version of eclipse should I download? I'm tempted to just get the java EE Neon version because it's the newest, but the others have way more downloads

>resumebot
What places do you apply to?
I'd like to make this too.

*Tips fedora*
M'lday

diff POP OOP
1c1
< POP
\ No newline at end of file
---
> OOP
\ No newline at end of file

>reusme script
>tfw I didn't think of this
which service does it use to apply?

why don't programming languages use more UTF symbols that are common in mathematics?

Use a library like libtorrent, famalam.

requires UTF encoding

Foo f;
Foo ff;
Foo fff;


Done, space for 3 Foos allocated

genericReplicate, then

>rounding down

A lot of languages don't require compilers to support UTF-8 because muh ease of implementation or some shit. So you can't require compilers to implement support for symbols they're not required to implement support for.

I mean shit C still supports trigraphs right?

def find_email(self, response):
data = response.xpath('//body[@class="posting"]')
for i in data.xpath('.//li/p[@class="anonemail"]/text()'):
email_address.append(i.extract() + '\n')
os.chdir('/home/eedee')
email_file = open('email.txt', 'a')

if len(email_address) >= 1:
for i in email_address:
if i in l:
continue
else:
email_file.write(i)
l.append(i)


it scrapes craigslist for emails based on location and job type then another scrip sends emails to the scraped emails. i can only mine five emails at a time though because craigslist will through capchas if you start requesting too much. the email scrip actaully uses files/lists to make sure not apply to the same email wtice.

scrapy
smtp

are the libraries i used but you could do it with tons of libraries and tons ofdifffernt sites.

Good idea, thanks

ill ook into it but im writing it for python ;-;

it can help me understand hte bitorrent protocol though which is what in eed to get in the python

pypi.python.org/pypi/python-libtorrent/

Have you gotten any interviews through botting?

Is there a way to use the DOM with requested webpages using node.js? Not a fan of cheerio desu.

...

Lost

>typical C++ code monkey
You do not know the diff between allocating and initializing.

Bad C coder went on C++.
Good C coder stay with C.

hackage.haskell.org/package/unicode-prelude-0.1.1/docs/Prelude-Unicode.html

What you said above is indication of bad corporate culture and frankly I wouldn't work at those companies.

But if you're desperate for getting that job, asking about the dress code for the interview and then appropriately wearing what fits the guidelines they give you is better.

How do i interpret a byte sequence as any arbitrary data type, where the data type is given by the user during runtime?

>mfw I have to start on a C++ job after Thanksgiving on Monday.

I just hope I don't lose my sanity developing C++.

thats why you do a research beforehand, also call from another number and ask if you have to be dressed well or not, say you have interview coming next week (even tho its tomorrow)

I answer here .

You didn't say he wasn't allowed to initialize them.

And if you really do need to allocate an object without calling the constructor (which is stupid, since the job of the constructor is to ensure the object is in a valid state - if the valid state doesn't require any action, make the constructor a no-op) you can just malloc as you would in C.

Can someome please guide me

You want to play it dumb.

>And if you really do need to allocate an object without calling the constructor (which is stupid, since the job of the constructor is to ensure the object is in a valid state - if the valid state doesn't require any action, make the constructor a no-op) you can just malloc as you would in C.
I want to allocate in the stack?

Since you're a newb, it probably doesn't matter one bit which one you choose.

Then use alloca.

>I want to allocate in the stack?
Use inline assembly and decrease stack pointer by sizeof(foo)

>IDE can't handle ncurses

What am I even supposed to do then?

Call a function?

I want the asm code to just change the pointer to stack for all the local vars. Not call a function at runtime. Why an esay task in C become difficult in C++.

no comments

Don't use the IDE.

I just got 2000$ insurance money, what can I buy?
I was thinking of getting an Apple laptop and a nice Android smartphone (OPO3 maybe?).

What do you guys think? I already have a decent Windows desktop and a Linux Thinkpad X230

How do you do it in Java? It's a feature inherent in all the object oriented programming languages. If you still don't want to initialise when declaring, you can just not define a constructor and define a separate init function.

If you haven't already maxed out your IRA contribution limits for the year, put it into a Roth IRA. Look for an unmanaged one. Something like Vanguard's target retirement funds are a good choice.

This is a programming thread, not buyer's advice.

Also, the dollar sign precedes the amount.

I chuckled

iPhone SE + cheap Macbook imo

maybe put it in a savings account. How old are you?

Do you contribute to both a Roth IRA and a standard IRA or no?
>t. about to enter the workforce

So i need write function for every datype that exists?

I'm 21, I work and save money out of every paycheck.

No I can just stay with glorious C.

Generate it compile-time using templates or a similar system.

Roth if you're young, regular if you aren't

I'm 25 and the jobs I'm interviewing for pay 50k with some benefits, first "real" job other than Starbucks. I have $0 in the bank right now.

my only expenses are rent and food

Go regular?

Hard to see you being a good saver when you're consider blowing $2000 on a macbook when you already have a good desktop and thinkpad.