/dpt/ - Daily Programming Thread

Old thread: What are you working on Sup Forums?

Other urls found in this thread:

pimp.name/hacker-name-generator/
oocities.org/xo_pitseleh/lom2.html
twitter.com/NSFWRedditVideo

How much do you personally earn annually with your functional programming job?

Trying to understand time

how do i decide on a good github nickname?

my name is kinda odd (european name), and i don't know if that might be a problem

Fuck your stupid anime shit

pimp.name/hacker-name-generator/

Make sure to use something that contains "feminist", "sjw" or something related to "girls can code". If you're really on to it, make it a mixture of all of them.

why should it be a problem? what does "european name" even mean?

SpreadEm69

I make 70k at entry level, but I'm OOP familia

His name is probably something like Jaroslaw Kczkckztzt

His name is Adolf. So it gets blocked by neopets

what if my name has "Stalin Stevens" ? or any other dictator name as first name?

not even kidding here

My last name is close to that, it even includes polish letters, feels bad m8.

what about it? unless your name is literally Adolf Heitler or Mao Zheng-zum-Dum LongDong you are fine.

moving on from my days of using PajeetLang

Nothing useful.

I'll try that.

I dicked around with a GUI for it, because I am really really fucking bored.

I guess I could add multiple image generation algorithms.

Webm related.

>tfw my name is Adolf Heitler

post the images generated

They look like this, more or less.

Based on another user's method from last thread: I could create various generation algorithms and just have a selector to choose what kind of image to generate.

>I could create various generation algorithms and just have a selector to choose what kind of image to generate.
how cool is that?

what about Mao ZeLong Wang?

Also, it says max image size for this one is 16MB, but it only came out 556KB because of PNG mechanics.

Anyone know how to actually estimate?

I guess I won't be able to really know unless I take the average optimization based on the usual runs with a particular image generation algorithm...because I'm pretty sure a PNG could technically be 8 bytes per pixel.

I was tempted to add some generation code myself but I'm really fucking awful at maths, it's the reason I stopped with gamedev.

I'm just dicking around with learning SQL now for an idea I had, not that I'll actually take my idea anywhere because I absolutely despise front end web dev, so I'll probably just write the backend then throw it in the pile of other things I made that now gather dust.

Here's my code for making gifs with ImageMagick (it just wraps the existing random image gen code)

Write("Insert size as space seperated integers X Y: ");
int[] inputSize = Array.ConvertAll(ReadLine().Split(' '), int.Parse);
Write("Insert number of frames: ");
int inputFrames = int.Parse(ReadLine());
Random rand = new Random();
Array vals = Enum.GetValues(typeof(KnownColor));
using (MagickImageCollection collection = new MagickImageCollection())
{
for (int f = 0; f < inputFrames; f++)
{
using (Bitmap bmp = new Bitmap(inputSize[0], inputSize[1]))
{
for (int i = 0; i < inputSize[0]; i++)
for (int j = 0; j < inputSize[1]; j++)
bmp.SetPixel(i, j, Color.FromKnownColor((KnownColor)vals.GetValue(rand.Next(vals.Length))));
collection.Add(new MagickImage(bmp));
collection[f].AnimationDelay = 5;
}
}
collection.Optimize();
collection.Write($@"C:\TestGif_{inputSize[0]}_{inputSize[1]}.gif");
}

you just need to grab "Magick.NET-Q16-AnyCPU" from NuGet and you're good to go.

So that Magick library is just shoving multiple bitmaps into a .gif?

>collection.Optimze();
lol

I suppose you could go without if you don't want your code to take the extra step.

I might play with that library for a bit. Gotta love NuGet.

>not optimizing png

As far as I know yeah, it's an image manipulation library so it does a whole heap of stuff.

Never used it before, but I was bored so I quickly grabbed it and Intellisense'd my way through that quick messy implementation.

As far as I can tell the .Optimize() call does a fair bit of work, there's also .OptimizePlus() which tries to remove frames and the like where it can if it improves the end quality.

If I were able to even understand (let alone implement) something like Perlin noise I'd probably take the time out to improve that little thing and make it do more advanced stuff, but I had an idea for a replacement for "up-for-grabs.net" which wasn't so lazy and had an actual backend. But I really don't like front end web stuff so I'm struggling to find the motivation to bother, instead I sit here writing garbage that just gets Ctrl+A -> Del'd at the end of the day.

It's either that or I spend more time shitposting here.

I got a Java Software Engineer job all I do is write Arrays to go through large list of company information and putting information in software

I will need to figure out how to do this programmatically.

Thank you for optimizing my PNG.

Welp, I did 60 frames at 640x480 and it took quite a while to create, about 30 seconds.

Pic related.

...

I'd probably multithread the frames and wrap the .Optimize() call in a Stopwatch to see how much time it's eating up.

I'll do that.

Here's an epilepsy simulator. I suppose I could force color compliments to be extra trippy.

Also, some values are transparent.

Do you know which of the KnownColor enum values it is?

but you can't see the difference in naked eye.

what's the point?

Anyone here use Android Studio? Anyone here program for Android purely using the SDK?
Thinking of going SDK only because AS sucks ASS.

But I really wanted something where I could just download a project from github and run gradle and pop out the APK.

>But I really wanted something where I could just download a project from github and run gradle and pop out the APK.
Then just use the SDK via command line.

You could also try passing it through ffmpeg instead if you want to get more into less space. There are a few ffmpeg wrappers for .NET I think.

Android programming is hard there is so much stuff to learn

Post most anime girls holding programming books, please.

Why not use C# and Unity to make Android apps?

Shit's easy as hell.

looks like a ZX spectrum loading screen

>fucktons of tedious UI code for 10 lines of image generation algorithm
>probably doing file-size maths horribly wrong
>can already think of 40 things to improve the UX with hints and unobtrusive notifications

So this is why we only do backend in /dpt/. Less work, less stress, less perfectionism-flavored autism.

Or use Xamarin. It's free now.

Because I hate that non-native glue crap, I don't even mind Java. I'm going to do more of a social app that doesn't need a lot of fancy shit, just going to make calls to a rest api.

>Same line attributes
>No MVVM
I rate you 3/10 gimme my image code back.

But no really why did you bother putting that much directly into a timesink? I can't stand WPF anymore, too much effort to get stuff done. I just write Libs and then hook em up to a CLI for testing before throwing em in the garbage.

what gives you guys motivation to program? I am at a point where I am pretty decent but I lose all interest when I encounter difficult problems and then really difficult programs and get errors and bugs all over the place which makes me not want to program because I don't just get it naturally and requires so much effort

>why did you bother putting that much directly into a timesink
Bored at work.

I need a cute dominatrix to force me to learn proper MVVM. I really want to use it, but I can't be assed to go out of my way and learn it. I'm stuck in old WinForms methodology.

Nothing, which is why I'm sat here shitposting instead of working on my project.

For most everyone else it's a paycheck or autism.

For me it's that juicy paycheck autism wombo

If you use a good IDE, 75% of your problems are solved automatically, or at least the solutions are suggested with one-click fixes.

If you're good, 75% of the problems don't even show up.

MVVMLight, I never actually took the time out to learn MVVM properly because I got sick of WPF.

Web apps are where it's at, I just need to find a hobbyist frontend dev to team up with.

I do use a good IDE Netbeans but I still encounter the weirdest fucking errors doing anything complex with large databases or networking server side

>MVVMLight
Interesting, I have PluralSight so I'll look into this.

I suppose that'll help me with transition into Xamarin and MVC.NET stuff.

MVVMLight is mainly just for disposing of all the boilerplate that goes into writing MVVM stuff.

Unfortunately doesn't really avoid the problem of having to actually understand the application of MVVM to a problem, but hey it's a start.

Cats.

Cats are much better than black women and women in general

How do I get into programming? What do different languages do?

thinking of writing pseudo type signatures in the comments above my Scheme functions like
; function-name :: (Num) -> (Num)
like what Haskell looks like
so I can remember what a function does when I read it months/years later

will people make fun of me if they read my code and see this? will I get bullied by other lispers?

Someone that is hired either as junior or senior programmer.

Is there any task that I can test my skills on ? I mean, I think I can program (C++, OOP and many others stuff I know) but I am not sure if I am able to do something that would make me employable.

I need some sort of advice. What is the daily / weekly / monthly task that is achievable by junior developers ?

Learn Haskell

This. Haskell will guarantee your employment.

how could i improve this?

#include
#include
#include
#include

using namespace std;

int main()
{
HANDLE h = GetStdHandle( STD_OUTPUT_HANDLE );
SetConsoleTextAttribute(h,FOREGROUND_GREEN | FOREGROUND_RED | FOREGROUND_BLUE );
while (true)
{
string y ;
cin >> y ;
SetConsoleTextAttribute(h,FOREGROUND_GREEN | FOREGROUND_INTENSITY );
cout

stop using seeples

I dunno, man. I'm pretty fond of black women.

You'll grow out of it

make a backup, delete windows and install any linux distro
now import it and come again

>download Visual Studio
>see this
>a single white person
>it's a tranny

When will this meme end?

Jesus fucking Christ. Stop browsing Sup Forums, it's killing all your braincells.

Bowl cut squad

write a wrapper library for windows.h

Did you not see the comparison between the NASA google doodle and that actual NASA team?

No, please post it so I can have a giggle

I'm guessing this one.

I like how they add "color" to everything to be politically correct, like smearing dogshit on white bedsheets.

Can someone explain to me why C programmers avoid enums like the plague?

pic
apparently they'd need 18 people in order for it to be accurate to have just 1 non-wihite

>Can someone explain to me why C programmers avoid enums like the plague?

Microsoft monkeys know no better.

Jesus fucking christ that's bad. I honestly feel sorry for white males just getting into this field. It's hard enough to find a worthwhile job even without the "righteous" discrimination agenda that's being pushed these days.

These are many black peoples.

However, why the hell would you use VS or windows in general? It's inferior.

...

is learning pic related worth it?

kek

lol no

why? it's a interpreted gui framework that works on every single platform. that is very attractive by itself

Can anyone lend a helping hand? :-)

No sound plays like this, with the line commented out. If I uncomment the line, both sounds play. What gives?

static void playSound() {
try {
AudioInputStream audioInputStream = AudioSystem.getAudioInputStream(new File("C:\\Users\\John\\workspace\\ConsoleTimer\\gong.wav").getAbsoluteFile());

Clip clip = AudioSystem.getClip();
clip.open(audioInputStream);
clip.start();

//Toolkit.getDefaultToolkit().beep();

} catch(Exception ex) {
System.out.println("Error with playing sound.");

ex.printStackTrace();
}
}

>tcl
*tickles*

But seriously, tk is pretty good, tcl not so.

what should I learn to start a career in software development without going to school?

Pick a language, find a textbook online, and go through it front to back. Learn git, create a GitHub account, and start creating stuff.

Read a new book about programming, databases, etc. every month. Apply what you learn from the books to your personal projects.

Try to make the projects meaningful so you don't lose interest. Find a local programming club and make connections.

How would /dpt go about implementing a neural network or genetic algorithm to find the lowest rarity by drop rate and highest attack tempering recipes using this information ?

oocities.org/xo_pitseleh/lom2.html

Assuming I've also got the details of the actual calculations and mechanics as they are in the game.

>neural network or genetic algorithm to find the lowest rarity by drop rate and highest attack tempering recipes using this information ?
Tired of these memer kids.

>neural network or genetic algorithm
calm down with the memes

those aren't necessary here

Oh, assuming I've already got a method for testing the fitness of a recipe what would you recommend here to generate new recipes?

>Fire Saint
I kinda like it, but it repeats itself quite often and uses "fire" a lot.

What's the best programming language?

Holy shit go learn Retrofit! It will make REST apis your bitch.

Can you not?

What's the best real world language?

Haskell

yes

The one the hacker Sup Forums uses

z80 assembly

requesting that gif of the news anchor asking "Who is this Sup Forums"

All of the languages exist in the real world.

Whatcha mean?