/dpt/ - Daily Programming Thread

What are you working on, Sup Forums?

Previous thread:

>want to program
>i don't have any big project goals or any idea about what I want to program
fookin kill meh

Trying to learn python

I have an array with different keys/values for a business. Like so:
>name => John's Pizza
>bussiness_manager => John
>etc

However, these two pieces of info (and more) go into two different tables, how do I properly separate the information into different arrays?
I was thinking of having an already existing array with the column names of the tables and loop through them to see if they match the POST array. Is this good.

try

real bread (now with dubs)

And without anime shit.

>hating on anime
>on an anime website
Reddit pls

...

why.jpg

>allahu akbar
>???
>BOOM

>Profit!

>Too lazy to start over

How do I become master programmer in a short time, Sup Forums?

Does anyone know an environment/software that would let me build arbitrary text files out of parameterizable snippets?

Something like:
"Bob has a $COLOR car." where I assign value "red" to the $COLOR and the final output file will be "Bob has a red car."

I would like these snippets to be managed by a central library - meaning if I change content of a certain snippet it will change in all the files I am using it [multiple file support].

Also I need those snippets to support nesting - meaning one snippet containing pointers in its content to other snippets and so on.

Anyone knows a solution that could help me out here or at least something as close as possible? I mostly want to generate XML files with this but not always, sometimes content and syntax of those files will be completely custom and arbitrary.

Keep the anime OP image. If someone has a problem with anime, it's likely they are not programmers and are here to bikeshed. There is a strong correlation between liking anime and being a programmer. Actual scientific fact.

anime isn't even that of a big deal it's the muslim shit that some user keeps spamming like the trapfag did with himegoto

I have stats in my Engineering course and have to learn R

Redpill me on R

Yeah I see your point, I'm Muslim myself (not OP obviously) and even I don't want Muslim crap in my /dpt/. Tech is where I go to escape all this religion/political shit.
I want the spinning sicp girl back.

Let's post problems and solutions, it'll be fun. I'll start:
>a method/function/procedure
>write a method/function/procedure that takes an int n and returns true if n is even. The method cannot use the multiplication, modulus, or division operators

Here's my solution
boolean isEven(int i) {
while(i>0)
i-=2;
return i==0;
}

stupit muzzies

Here's a better one:

boolean isEven(int i) {
return (((i)

damn, not bad

PHP -> Twig
Python -> Jinja
Ruby -> erb
Elixir ->eex

nice UB

It's bretty gud but in the real world you'll be using SAS and SPSS really.

it depends?

are you virgin?

What language is this?

Does it matter?
No. I've used an onahole once.

The data type is trivial, use void instead.

Java.

boolean isEven(int i) {
return Integer.numberOfTrailingZeros(i) > 0;
}

Wondering why I'm hungry, have little money, unemployed and basically homeless.

Do you know what it's like and what it makes you feel like not eating much?


Richard
fbfounderNative

My curiosity can't be contained anymore, I want to learn a functional programing, but I'm not sure which one to go with. I'm thinking I should learn something practical and actually useful but I'm not sure if any functional language exists that is both useful and much different from a procedural language, if that's the case then I'd rather go all in and use something that may not have a practical application but may have an educational one, one that will force me to use a different style and tackle problems in a way I'm not familiar with.

In either case could people recommend me languages for both? i.e.
Practical: X, Y, Z
Academic: A, B, C
Y is good for... B is interesting because...

I would appreciate it.

Would be quicker to just bitwise AND with 1.