/dpt/ - Daily Programming Thread

What are you working on, Sup Forums?

Old thread:

Other urls found in this thread:

youtube.com/watch?v=n2uJDp1sNy0
twitter.com/SFWRedditImages

>when user quotes you

Lisp

What kind of malware do you have experience writing? Why?

Actually, good programmers do use patterns, they just don't care about taxonomy.

>A) DRY is a design pattern
>B) Using design patterns is repetition
>A ^ B) Using design patterns requires violating design patterns

There is literally nothing wrong with using singletons

There is a difference between design patterns and """""design patterns""""".

If a data structure has a space-complexity of O(nr + n), can I just simplify it to O(nr) as n would be a non-dominant factor?

Or will n still have to be accounted for, and I'm mistaken in my assessment of it as a dominant factor?

Holy fuck guys please keep your code clean

can someone riddle me this:

PerceptionComponent->OnPerceptionUpdated.Add (delegate);

so my understanding is that a delegate is like interface in java. but Im not sure about the syntax. according to a tutorial it should look like this:
PerceptionComponent->OnPerceptionUpdated.Add(&AAIControllerUnit::SenseStuff);

I dont get it. is this the reference to the static implementation? can't I give a reference to a specific instance?

>can I just simplify it to O(nr) as n would be a non-dominant factor
yes

>realize my code is hideous
>say i'll go back and clean it up after I get it all working
>get it working as desired
>eh, i'll start on the next project and clean this one later
itjustworks.jpg

Shut the fuck up Pajeet

O(nr+n)
O(n(r+1))
O(nr)

Do you guys unit test your code?

On my resume it says I do

>realize my code is hideous
>say i'll go back and clean it up after I get it all working
>it's all in COBOL
>stop giving a shit

What I meant was use (((design patterns)))

No, I write formal proofs instead.

If course, I have a job

youtube.com/watch?v=n2uJDp1sNy0

/dpt/ - Designated Pajeet Thread

no

that's right, bitchboi

I just knew Postman is built by pajeetnation

Do you write unit tests for your unit tests?

This

What is this "Lisp", user?

Do you write formal proofs of your formal proofs?

...

I write my proofs exclusively in anime (which is complete, consistent and decidable).

Thank you for using anime images!

why am I too retarded to understand delegates?

So-called "delegates" are themselves retarded.

hah, a subtle but devastating #wreck..

>subtle
In what sense?

Maybe they speak in a foreign language.

>C#
Die in a bus fire.

c++

>c++
Die in a bus fire.

>delegates
Are you Ted Cruz?

The thread is as dead as D, which is very dead.

How can languages and threads have "lives"?

If the js-hipsters are not constantly writing blogs about it it's "dead". For alive languages see rust.

they live in the metaphysical layer of stallman. this is like 10 layers deeper than the religious one.

>stallman
Stopped reading right there.

too bad your a brainlett

>brainlett
What is an "brainlett"?

I just got 1 (ONE) question today.


How do I become a good programmer like Andrei?

the image

HAHAHA That shit isn't in the budget cuz the suits want that shit yesterday.

I don't understand the question

Delegates aren't used in C# anymore. At least, not in the way you might be thinking or thought of.

Ability to unsarcastically read a good tech book from cover to cover and grok most of it, is the single most important skill a programmer can acquire.

I disagree.

There's nothing wrong with my logic. I hate it when people say "your logic is flawed" when they're talking about your premises. Logic is not premises. Logic is the relationship between premises and a conclusion. If your premises are flawed, your logic isn't invalid, it's unsound.

>The documentation example doesn't show which headers to include
This happens way too fucking often. Anyone who does this needs to jump off a fucking bridge.

>he mad

>His language doesn't have modules

>headers
Sucks to be you.

>He uses emoji in his commit messages to denote commit type

>muh lamb duhs
>muh moan ads

>emoji
What is a ``emoji"?

>muh
>ribbit the reddit frog

>>ribbit the reddit frog
>mfw

@60911623
@60911670
Everything in your posts reeks of reddit.
Seriously: piss off. Your kind is not welcome here.

dumb frogposter

>he assume it are unironic
>mfw

I just had a look at Arduino
Can anyone tell me whether you have to use C++ and their weird sketch shit
I want to work more on the hardware level and with C

I am more or less trying to organize my time for college, coding and shit.
about 2h dedicated for organic chemistry, 30min for genetics a day plus 1h every sunday
2h for math every second day and the rest is used for coding assignments.
It's not easy, but I think college is a good place to prepare me for the workload of the CS/IT industry.

@60911740
"""unironic""" frogposting is still frogposting. Fuck off, retard.

I don't care what the motivation or subtext was, the fact is you did it and you are a dumb frogposter.
Now go back to r9k or reddit.

Pls reply
Will post cute anime girl

>his language doesn't have any libraries to import

what language did you first learn?

how much will it impede by ability to start programming if I try to learn coding with two languages at once?

is Mathematica and MATLAB irrelevant if you can code?

>Will post cute anime girl
Do it.

I first learned Haskell, I wanted to kill myself
Now I learn a bit of Python and majority of time Java for my assignments and courses.
As long as you can manage your time, you can manage everything.

Go be retarded somewhere else, like at reddit. Your kind isn't welcome here.

You better not trick me

Learned JavaScript first.
Then C
Then C#
Then F#
Then D
And now (((Rust)))

Learned Java first. I found that it made me overdesign and overcomplicate a lot of code, writing C helped me learn to simplify.

Mathematica and MATLAB are irrelevant outside their domain, but they both are used quite a lot for "non programmers" who need a math programming language. Personally, I prefer to do mathematics in Python (with numpy) or Scheme, but that's a personal preference.

Learning two languages at the same time is not impossible, but I would recommend alternating between the two every week or every couple days, rather than trying to actually simultaneously learn two new things

No, you don't have to use sepples.

So I'm implementing a Lisp interpreter in Lua and a question crossed my mind on the way: why are (lone) pairs so rarely used in Lisp? It looks like pairs would fit some constructs like (let ((var1 expr1) ...) expr), yet they use lists anyway. Wouldn't it make sense to write (let ((x . 1) (y . 2)) (+ y x)) ?

Noob here, what is the time complexity of this algorithm checking if number is a prime:

def is_it_a_prime(number):
if number

If the size of the input increases by a factor n, then the number of ops performed increases by a factor of sqrt(n). So yes.

Thanks! So if I want to generate n numbers of primes, using this algorithm, time complexity would be O(n * sqrt(n))

Roughly in order:
DarkBASIC
C++
C
Python
C++11
Rust
C#
SQL

>C++
>C++11
As if C++11 is a different fucking language

I basically had to relearn c++ at that point since i forgot most things, which is why i listed it separately.

Yes. But if you are concerned about speed then you should consider a specialized algorithm such as a sieve of Eratosthenes.

>As if C++11 is a different fucking language
Might as well be.

C++11 is completely different.
Writing new C++ like you're writing C++98 is just as bad as if you were writing it like C.

Thanks. I'm not concerned about speed. I'm new to understanding the time complexity and big O notation, so I was just wondering.

Is::this""::yet?

Only when I already have a completed function to compare the results to. I just manually test/debug until I get the proper answers from the function

Because sometimes I just don't feel writing out every answer to every function.

>C++11 is completely different.
Did it get modules?

>how much will it impede by ability to start programming if I try to learn coding with two languages at once?
Not at all, in fact it probably helps, because it's easier to separate knowledge that's specific to language and generic programming concepts.

No. They added more of it.

C++ can now infer a lot of template arguments. That and auto helps cut down on that shit a lot