[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: 27

File: daily programming thread2.webm (2MB, 600x338px) Image search: [Google]
daily programming thread2.webm
2MB, 600x338px
old thread: >>55715537

What are you working on, /g/?
>>
File: ocaml2.jpg (9KB, 132x195px) Image search: [Google]
ocaml2.jpg
9KB, 132x195px
Dibs for OCaml master race.
>>
What's stopping me from using sqlite for all my applications?
>>
>>55720551
motivation
>>
>>55720596
sqlite doesn't scale.
>>
>>55720551
Okay, I have this shit here

action = raw_input("""
What action to take next ('help' for options, 'exit' to exit): """)

if action == "help":
print """
'help' for options
'exit' to exit
'email' to send IP of machine per email
'status' to get status of machine"""

elif action == "exit":
print """
exit process and logout"""

elif action == "email":
print """
email"""

elif action == "status":
print """
status"""

else:
print """
start over"""


how do I let this part of code start over?

I'm new to python and didn't find a proper solution yet.
>>
>>55720156

Fixed the trailing white space in this guy's code.

http://pastebin.com/8GwGCbKj
>>
>>55720596
fopen()
>>
>>55720608
loop
>>
File: android-wallpaper5_2560x1600_1.jpg (63KB, 800x799px) Image search: [Google]
android-wallpaper5_2560x1600_1.jpg
63KB, 800x799px
Daily reminder to learn Java and get a job
>>
>>55720658
is that what javafags do these days, write android apps?
>>
>>55720658
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

public class Java
{
public static void main(String[] args)
{
ApplicationContext context =
new ClassPathXmlApplicationContext("Beans.xml");

HelloWorld obj = (HelloWorld) context.getBean("helloWorld");

obj.getMessage();
}
}

>>
>>55720735
Spring Boot actually makes Spring nice to use
>>
>>55720658
im a hobbyist
god actually working for a software firm seems like the worst existence
ending up at accenture or some shit is the opposite of ``making it''
>>
>>55720551
fuck off with this autism
saged
>>
    for sub in submissions:
# Not a text post
if 'x' not in sub.url:
yield sub


How do I transform this to a comprehension?

yield
(sub for sub in submissions if 'x' not in sub.url) 
is not equivalent cause it returns a generator object rather than a sub
>>
>>55720759
I get paid $40 an hour to do this Enterprise java shit and all I do is fix a little bit of a function get an error google it fix it change something else get another weird error and repeat the process
>>
>>55720614
That's mine? What did you mean by trailing whitespace?
>>
>>55720779
Sounds like the dream of a code monkey. Good job monkey boy
>>
>>55720779
its a living I GUESS
>>
Working in C# I have some objects that are created that need to each have a unique ID, i have a list of used ids, and the constructor adds a new id to the list when an object is created.

Problem is I want to remove the id from the list once the object isnt used anymore, my first thought was to put it in a destructor, but everything ive read says to never, ever, use destructors in C#. So whats the alternative? no one ever mentions an alternative.
>>
>>55720717
Yup. Writing android apps is one of the things.

What have you been up to?
>>
>>55720803
>>55720819
What do you guys think is a "living" Define dream software job that pays more than $40 an hour Goodluck
>>
>>55720820
if i cant get any other way im just going to save the id as a long and hove the user never makes more than 18,446,744,073,709,551,615 objects.
>>
>>55720608
Why are using three double quotes?
>>
>>55720820
ok you have an unique id
how the hell you would even 'destroy' it since it you have asserted the promise it will never be used for another object
>>
>>55720885
to make it multiline-prints
>>
>>55720801

"Trailing whitespace is any spaces or tabs after the last non-whitespace character on the line until the newline. In your posted question, there is one extra space after try: , and there are 12 extra spaces after pass : >>> post_text = '''\ ...Jan 28, 2014"

Generally devs have a editor plugin to detect this. It can fuck with vim / emac users and is bad practice in general.
>>
>>55720918
I thought three double quotes were used for multi-line comments or docstrings. I know you can use backslash to break up a string onto multiple lines.
>>
>>55720935
>It can fuck with vim / emac users
Nice, thanks for the tip
>>
>>55720830
I work in a research lab doing machine learning and natural language processing. It's a summer internship, but once I finish my MSc I plan on working as a research engineer or do my PhD if I get funded. I'm gladly giving up money code monkey salary for a more fulfilling role
>>
>>55720892
thinking of this more
if you can assert an property such as no object created temporally later will have an sequential id smaller than any created before it
it simplifies your problem greatly
>>
>>55720960
thre double quotes are used to create multi-line strings. works for docstrings as well as regular strings
>>
>>55720658
Most android developers are switching over to Kotlin though, that's how bad Java is.
>>
>>55720968

Don't worry anon most experienced vim / emac users run a script to automatically remove it :P. So it's just a annoying thing to see
>>
>>55720935
are you for real

do you program with a hex editor

meu deus
>>
>>55720935
how does it fuck with vim? literally never had a problem and i've been using it for 4 years
>>
>>55720830

I want to get into a lab doing high performance scientific computing.
>>
>>55720772
get rid of that yield before the generator expression

>>> def f():
... for v in [1, 2, 3]:
... yield v
...
>>> f()
<generator object f at 0x0000000000625AF0>
>>> next(f())
1
>>> f = lambda: (v for v in [1, 2, 3])
>>> f()
<generator object <lambda>.<locals>.<genexpr> at 0x0000000000625AF0>
>>> next(f())
1
>>
>>55720975
if you want a more fulfilling role why not make a start up and work on things you actually want to work on, or do you not have a vision aside for laboring for others?
>>
>>55721001
>most experienced vim/emac users make completely unwanted changes to parts they aren't supposed to touch
That doesn't surprise me
>>
>>55721030
probably talking of some old ass amiga version
like how gcc still warns if a header file doesnt end with a newline
>>
Why is all of java courses and programming text books all ignore 90% of this code and you will learn it later throughout the whole thing? How is one suppose to seriously learn programming properly with java? I think it is impossible
>>
>>55720960
>>55720991
Yeah you're right, changing that now
>>
>>55721091
because that kind of stuff is seriously over your head at the start.
if you wanna learn java, i personally think it's better to start with python for control flow stuff and then move to java shortly before getting started with oop stuff in python, just because python allows you to focus on control flow at the start.
>>
>>55721030

I take it you don't use $ or End often . Trailing whitespace can fuck with cursor movement in annoying ways. Not to mention that I've seen bugs in python programs from it.
>>
>>55721125
Java is taught wrong
>>
>>55720999
Not most devs but yeah some of them are. And yet out of the many that tried Kotlin a few sticked to it because of the security that Java brings.

Google already supports one language thats not in their control they are not going to support another.

Java is masterrace anon.
>>
>>55721045
>get rid of that yield before the generator expression
This is inside a function, and I'd like to return an iterator. I was trying to yield a generator instead of returning a list (
return [sub for sub in submissions if 'x' not in sub.url]
) but I'd like to maintain the API the same such that the function that calls it can still iterate through the returned iterator and treat each element as it was treating it when it came from a list. I dont know if this makes sense
>>
>>55721145

You do realize google has been talking about adopting swift for the android platform right?
>>
>>55721052
Because these are the things I actually want to work on, and being affiliated with a world class lab gives me access to supercomputers and lets me engage with world class researchers.
>>
>>55721185
yes but what happens after your phd?
>>
>>55721171
i gave you the code
look at it
>>
>>55721171
does python or w/e not have a filter function
>>
>>55721135
>I take it you don't use $
Yeah you're right I guess i just type gE by reflex when i'm not at the end of the word. What python bugs?
>>
>>55721206
sure it does, but why would you use it if you can instead use list comprehension syntax which looks a bunch nicer?
>>
>>55721180
Yeah they had some dispute with Oracle and there was some suing involved. With that said Google needed to make such statement.

You don't understand politics anon and you don't understand programming also. Better learn Java and get things straight.
>>
>>55721180
Java will always be the top dog in programming and never replaced
>>
>>55721202
I did but then you used a lambda and lambda only uses one line while I need more for my function

>>55721206
It does but list comprehensions are faster
>>
>>55720551
So qwerty, dvorak, and coleman. Which of the three is fastest for programming?
>>
>>55721201
Join a research lab? Google Brain (Magenta team), DeepMind, OpenAI, even Facebook AI and Microsoft Research. These are all companies that have people I'd like to work with, and subjects that I am interested in
>>
>>55721236
>coleman
Meant to say colemak
>>
>>55721240
What's machine learning and natural
language processing?
>>
>>55721222
>it looks better
for a pretend-fp babby
>>
>>55721228
why to god is a list comprehension that does filter faster than filter

>>55721293
baby*
>>
>>55721283
AI fields
>>
>>55721227
>>55721223

COBOL will always be top dog and never replaced they said..
>>
>>55721307
Idk, that's what benchmarking results showed (done by people on SO)

Also Guido hates functional paradigms and recommends list comprehensions. Same with most python style guides
>>
>>55721228
nigga are you serious
you can use that generator expression just like that
if the function that yields a result doesn't fit into a single generator expression, then you cannot solve that issue with a generator expression
>>
>>55721307
Doing a map/filter creates two separate objects. List comps don't.
>>
>>55721323
guido thinks overdoing it with functional programming harms readability
which might be true for everyone (this is debatable), but certainly true for the python community that are mostly used to c langs
>>
>>55721351
It depends of the compiler.
>>
>>55721347
the part that yields the result fits in a single generator expression, but not the whole function...
>>
>>55721308
what degrees did you study? also what languages do you know?
>>
>>55721379
post the (simplified) function and i'll tell you whether you can convert it and maybe show you an example
>>
>>55721323
>>55721351
guido is a faggot and python users get what they deserve
>>
>>55721307
list comprehension is its own thing written in C so it's fast

Python is ridiculous like that
>>
>>55721414
def func()
r = praw.Reddit()
r.login(user, pass)
submissions = r.get_subreddit('subreddit_name').get_hot()
return [sub for sub in submissions if 'reddit.com' not in sub.url]


And I want to return a generator instead of a list, but substituting last line with
yield (sub for sub in submissions if 'reddit.com' not in sub.url)
requires the calling function to use next on the resulting object. i.e. istead of just doing
submissions = func()
for submission in submission:
<do something with `submission`>


it needs to do

submissions = func()
for submission in submission:
<do something with `next(submission)`>


or something
>>
>>55721395
CS and doing MSc in machine learning; I mostly work in Python like pretty much everyone else in the field
>>
>>55721419
here's your (you)
>>
>>55721512
fuck your (you)
>>
File: xe_codes.png (55KB, 534x344px) Image search: [Google]
xe_codes.png
55KB, 534x344px
>>
>>55721484
nigga
i JUST TOLD YOU TO GET RID OF THE YIELD
a generator does what a yield does
you want to return the generator
you do not want to yield the generator (creating a generator that generates a generator)

def func()
r = praw.Reddit()
r.login(user, pass)
submissions = r.get_subreddit('subreddit_name').get_hot()
return (sub for sub in submissions if 'reddit.com' not in sub.url)


your code example at the end is also bullshit because that for loop in the second example will only run once, since the "submissions" generator only contains a single element: your generator!
>>
>>55721531
women are superior to men at programming and academia
>>
Is 23 too late to start programming?
>>
File: 1431471048976.png (63KB, 217x338px) Image search: [Google]
1431471048976.png
63KB, 217x338px
>>55721531
>>
>>55721512
Are you saying that what I said isn't true?
>>
>>55721498
>I mostly work in Python
you come from CS, your math obviously sucks and you didn't even pick up a bunch of other languages? how do you want to compete with millions of ML graduates with strong math background?
>>
>>55721536
>i JUST TOLD YOU TO GET RID OF THE YIELD

Haha I understand now what you were saying. In my defense I thought you actually meant remove (and don't replace) like in a lambda function, but you meant replace with return. Kkk thanks and sorry
>>
>>55721551
No just do it anyways
>>
>>55721531
> if =
> blame compilation errors on patriarchy
>>
>>55721571
the return in a lambda is implicit, so it's obvious that you should replace the yield with a return because a lambda always returns
>>
>>55721570
I have a decent maths background cause I took only the maths heavy courses and I've been studying on my own as well. Besides, ML mainly requires linear algebra, calculus, probability and statistics.
>>
>>55721531
i know him
he goes to my pharmacy
>>
File: 20160723_172021.jpg (1MB, 2560x1920px) Image search: [Google]
20160723_172021.jpg
1MB, 2560x1920px
>>55721647
>>
>>55721629
write a mathematical proof for the number 2

pro tip you can't
>>
>>55721531
> =
> fucked up indentation
> not using only one if condition1 OR condition2 instead of if else
>if else if
>printing a string is blocking
>Tweet object is unlikely to be Negative (maybe Tweet.sentiment

Any other mistakes?
>>
>>55721484
>>55721536
the fuck is a generator
oop name for an execution context?
doubt you need to hold cache data for such a simple purpose
yall boys making it just hard for yourselves
>>
>>55721531
>using endl
>>
>>55721700
it's just a lazy evaluator and yea its not needed
>>
>>55721691
2 girls one cup
>>
>>55721699

no one cares / suck my dilz / wrong thread idiot
>>
>>55721700
yields are for coroutines
generators are just a special syntax for simple coroutines
continuations, if you will
>>
>>55721699
You.

Fix yourself by killing you. You know that commands, right?

If you don't:

Man kill yourself
>>
>>55721739
>>55721751
>XDDDD
>>
File: 1469084154705.gif (2MB, 400x400px) Image search: [Google]
1469084154705.gif
2MB, 400x400px
>>55721758
>>
>>55721629
>I have a decent maths background
>calculus
that's just sad, anon.
>>
File: 1466282446300.png (271KB, 500x500px) Image search: [Google]
1466282446300.png
271KB, 500x500px
>>55721785
>>
>>55721785
i just said what's required in ML m8
>>
>>55721739
>>55721751
sure is summer around here
>>
I am planing to JIT my toy lisp language and thinking about using llvm for this job. Any tips or suggestions?
>>
>>55721785
The highest level of math I have done is discrete hipster computer applied math with all that math non sense I can't even remember it because it's so useless when am I ever going to use a ven diagram or matrices in programming?
>>
Going through the challenges. What the hell is tornado text?
>>
>>55721993

Matrices are often used for transformations / 3d geometry.
>>
>>55722199
/ proper fib functions
>>
>>55721993
images are matrices
datasets are matrices
>>
>>55721993
venn diagrams are useful for data visualization
>>
>>55722247
All the practical programming I have all done all involves the same thing of processing and manipulating strings and arrays
>>
>>55722237
yo can you elaborate on this view, im curious
>>
>>55722228

Yeah

| 1 1 | n
| 1 0 |
>>
File: mdt0c7.jpg (42KB, 512x335px) Image search: [Google]
mdt0c7.jpg
42KB, 512x335px
Anyone have experience with /appdev/?

For those of you who develop applications, do you find that Apple or Google has the better platform?

In terms of how the whole process goes. From the start all the way to the end with publishing.

I'm interested in getting into programming and I want to do SOMETHING and since I'm too stupid to do real programming such as machine code (^: I thought this would be a solid starting point to learn before getting into low-level things.

Apple seems like a far superior option. It just works.â„¢ Not to mention that it's only for iPhone, which makes it much easier to deal with the different models, but it's handled for you anyways. Downside is that it's much harder to profit as you'll really have to work for it and make something good, but if you do, you're set.

Google seems like it will be more tedious to deal with, especially with all the phones Android runs on. Which will create lots of things you'll have to babysit for various different models. It's very cheap to get in and you're also able to push out apps a lot quicker. Also you have more freedom I suppose?

Anyone have experience in this area?

I'm leaning more towards Apple as the solution for a retard like me due to the simplicity and just working.â„¢

Yeah yeah, I'll see myself out >>>>lgbt
>>
File: logo.png (17KB, 252x81px) Image search: [Google]
logo.png
17KB, 252x81px
So I'm about to make a Snake or Pong game(haven't decided) with pic related, SFML. I encountered a little issue here which is using libraries. Apparently I lack that skill and have no idea what dynamic/static linking is. Can't I just use the raw source code and compile that in with my program? Why do I have to use pre-compiled libraries which have to use specific versions of GCC to work?
>>
>>55722276
images are usually stored in multi-dimensional arrays (i.e. matrices of 3D vectors because a color image has 3 channels) and people do matrix operations on them

datasets are usually represented as matrices: columns are features, rows are data points, and people do matrix operations on them as well (e.g. PCA takes eigendecomposition of a matrix)
>>
>>55722314
Also I could just follow instructions and compile it but that won't teach me what the fuck is going on.
>>
How can I print a list [[1],[1,1],[1,3,1],[1,3,3,1]] in the format
1
1 1
1 3 1
1 3 3 1
in haskell?

I can do
mapM_ print nums

which gives
[1]
[1,1]
[1,2,1]
[1,3,3,1]
or I can do mapM_ (mapM_ print) nums
which gives
1
1
1
1
2
1
1
3
3
1

I'm pretty bad at IO manipulating, please help
>>
>>55722327
thanks

i absolutely cant grog this
>>
>>55722373
accidentally wrote the start wrong, should be [[1],[1,1],[1,2,1],[1,3,3,1]] in the format
1
1 1
1 2 1
1 3 3 1
>>
>>55722423
An image is like a simple x by y table(matrix/matrice) where each cell(excel terms, aka pixel in this context) contains 3(or more/less, let's stick with 3 for RGB) values at the same time. It's really easy once you get over the terms being used.

So a picture of 1000x1000 in RGB would be defined as
int picture[1000][1000][3]

for example.
>>
>>55722500
are images saved in 32-bit color?

I feel like you should be creating a 2D array of a pixel struct.
>>
>>55722500
>So a picture of 1000x1000 in RGB would be defined as
unsigned char picture[1000][1000][3]; /* optimal if CHAR_BITS == 8 */
>>
>>55722517
>are images saved in 32-bit color?
This is variable and depends on the format being used and what settings. I just used the most simple example I could think of.
If you're using 8 bits per color you should probably use char instead of int for example
>>
>>55722500
yeah i get that
but its my inability to think of lets say image pointers of anything than flat memory (planar of packed)
i understand the concept but the defined operations feel very unintuitive
ill do good some day
>>
File: file.png (4KB, 391x391px) Image search: [Google]
file.png
4KB, 391x391px
I dont know what the proper nomenclature is because I use libgdx that already has implementations for many things like a mesh etc.

can I render this with one mesh with 8 vertices in opengl?
or will it just draw a gradient between the black and red? and I really suck in writing shaders...
>>
>>55722569
>i understand the concept but the defined operations feel very unintuitive
You mean matrix operations? You don't have be understand them to use them, as long as you know what the effect is.
>>
>>55722423
All the terminology and concepts mentioned in that post are covered in a typical CS degree though?
>>
>>55722532
>So a picture of 1000x1000 in RGB would be defined as
unsigned char picture[1000][1000]; /* GL_R3_G3_B2 */

What was the point of your post anyways?
>>
>>55722634
Using int for this is stupid.
>>
I want to program something good and cool. What gives you the motivation to do so
>>
>>55722655
this fucking guy: https://github.com/GrahamCampbell

how the fuck is he so productive
>>
Just ordered the Xinu approach by Douglas Comer, and My Minix book arrived yesterday.
Finally going to sit my as down and work on a FS specification for my OS.
>>
My program has 119 warnings, most of them "comparison between signed and unsigned integer values", all from for loops. Is that really an issue, though? Should I change them?
>>
>>55722686
>php
>>
>>55722652
It isn't. Using 4 or 2 byte datatypes for color values allows for higher calculation precision. Doing floating point calculations with 8 bit data types loses a significant amount of precision, which should be obvious.
>>
>>55722686
holy goddamn titties
>>
>>55722715
char in C is not a float and RGB does not use floats.
>>
>>55720551
Sauce on the anime?
>>
>>55722709
Yeah but still

He's a first year doing CS + Maths and is the most active user on GitHub, one of the main maintainers of the biggest PHP web framework, maintains a million other projects, finished his year with a first, is on a scholarship, etc.
>>
>>55722652
It can be faster and have a bigger resolution(storing 8 bit in an 32 bit register) with int though. The tradeoff is memory usage.
>>
>>55722703
Change them anyway so it doesn't bitch. Functionally it doesn't matter but cleaning up error messages can be practical in cases of real errors.
>>
>>55722805
>bigger resolution
no

>in an 32 bit register
can happen while storing in char
>>
>>55722826
>no
Yes.
It practically allows a integer to pretend it's a float, adding precision. The output won't show it but internally the data will be there.
>>
>>55722796
sounds like php coding is how he's relaxing

that's c++ for me
>>
>>55722855
Again, RGB does not use floats. I am unsure why would you want to treat an integer as a float. (it's not even portable)
>>
File: 1469270773518.png (35KB, 1366x768px) Image search: [Google]
1469270773518.png
35KB, 1366x768px
>>55720551
This image is from previous dpt thread. I have autism + ADD, therefore have a hard time concentrating. How do I set up these vertical-line bracket alignments in vim?
>>
>>55722734
The point is, doing image processing with RGB8 textures will lose precision(will make your texture look shitty). Image processing always uses 2 to 4 bytes to store the texture, in the end after all processing is done, it may be converted into RGB8.

>>55722875
What the fuck is RGB in your mind? It simply stands for Red, Green and Blue, nothing else.
>>
>>55722373
>>55722463

unlines $ (fmap show) <$> nums
>>
>>55722957
>The point is, doing image processing with RGB8 textures will lose precision
Again, no because you are not using floats.
>>
>>55722875
>I am unsure why would you want to treat an integer as a float.
you do all kinds of math shit to them that produces and interacts with floats but in the end the iron only recognizes integer color values
>>
>>55722981
How dense are you? You can't into math can you?
>>
>>55722977
whoops, just
unlines $ show <$> nums
>>
Hi /g/
I'm new to programming, I'll be taking the introductory course to game design at my college campus. What would be a good compiler to use? I was recommended Textpad 8. I have some knowledge building websites using HTML, so I suppose that sort of helps, right?
>>
>>55722999
You do not know what you are talking about. I have been as clear as possible but you keep saying bullshit that make no sense.
>>
>>55723026
Floats and ints are both 4 bytes. Same level of precision.
>>
>>55722373

unlines $ (concat . intersperse " " . (show <$>)) <$> nums
>>
>Tfw you are all chads of the programming world with big programming weeners
>>
>>55722943
Put set autoindent in your .vimrc
>>
>>55723084
Grade B trolling. Apply yourself.
>>
>>55723084
>Floats and ints are both 4 bytes
Who told you that?

>Same level of precision.
Precision is not a thing in ints.
>>
>>55723017
Textpad 8 isn't a compiler, it's a text editor. I've never used Textpad, but I would recommend Notepad++.
>>
File: 1465342618036.webm (253KB, 854x480px) Image search: [Google]
1465342618036.webm
253KB, 854x480px
>>55723121
Thanks!
>>
is gcc -o3 stable yet?
>>
>>55723297
What do you mean? Why would optimisations be unstable?
>>
>>55723297
Use -Ofast
>>
File: lines.png (871B, 102x97px) Image search: [Google]
lines.png
871B, 102x97px
>>55723156
That's pretty cool too, however I meant these vertical lines. Anyone know how to set this up :
>>
>>55722314
Dynamic linking means that the library resides in a DLL (or SO file on Linux), so all the functionality you use is loaded externally from these files, static linking means that the library functions are "embedded" into your binary, meaning it does not need the DLL files and such alongside, yes you could just compile their source into your project but that means extra clutter, longer compile times and such.
>>
How did you guys get good at algorithms?
>>
>>55720658
>Gradle & Android Studio
100% Aids
>>
>>55723347
Google tells me you need the lineIndent plugin.
>>
>>55722943
Being a retard doesn't mean that you cannot use Google.
>>
>>55720551
>What are you working on, /g/?
Benchmarking my trie implementation.
>>
>>55723387
>Money and a job
100% not NEET fuck
>>
>>55723369
We didn't

>>55723347
There's a plugin called something
Productivity tools maybe?
>>
>>55722289
Why not go with xamarin and target both worlds. You only really need to target the flagship phones on android anyway, usually the apps will just work on everything else or the phones will be so niche it doesn't matter.
>>
>>55723451
>>55723410
Thanks i'll check out both.
>>
>>55723358
thx senpai
i just downloaded the source and compiled it with the newest version of GCC, which worked out lol
>>
>>55722709
>Ninja

why do people call themselves this? It sounds terrible. I remember seeing a job add posted looking for "coding Ninjas" and I cringed so hard.
>>
http://notes.willcrichton.net/rust-the-new-llvm/
>>
>>55723448
>implying you have to work with android to get a job

Sorry Ranjeet that you can only apply for Java related jobs.
>>
>>55723537
Here in America most of the programming jobs are all Java
>>
>>55722686
You could pay Pajeet to push new code to your repositories with your account credentials for less than $1 an hour.
>>
>>55722237
What level of math should I be studying at in order to be a solid programmer? Optimization theory? Partial Differential Equations? Abstract Algebra & Number Theory? PLEASE HELP
>>
>>55721531
>Block.
>Block
Fuck this shit.
>>
>>55723549
>Here in America most of the programming jobs are all Java
>most
Are you alleging that over 50% of programming jobs are in Java? Did you put any thought into the words you wrote or do you type semi-consciously on the keyboard?
>>
>>55723579
It's true they are majority of programming Software positions are all in Java in most places in America
>>
>>55720975
What kind of work are you doing
>>
>>55723564
PDEs are not particularly useful for a programmer, unless you are doing pretty specific numerical work. Same with abstract algebra. Number theory can be pretty important. Discrete math is a must, as is linear algebra.
>>
>>55723186
>Precision is not a thing in ints
except when you overstep the boundaries of your stupid chars, you retard
>>
>>55723549
My 5 minute internet research gave me 50 Java related Jobs and 100 C# related Jobs in my federal State.
>>
>>55723655
Java and C# are practically the same which confirms my statement Java are most programming jobs
>>
>>55723647
abstract algebra is useful
>>
File: 1.jpg (96KB, 800x480px) Image search: [Google]
1.jpg
96KB, 800x480px
>art of mp
More like art of redpilling
>>
>>55723699
adwadadda grgrrgsg
>>
>>55723678
Is it? I took an abstract algebra course and I can't see why group theory and noncommutative rings will be useful.
>>
What do you guys think of a bachelors in software engineering whereas the only programming language taught would be java? i was offered this course by the local college and was wondering if 4 years of java only was really ok.
>>
>>55723789
I doubt the only language you will learn will be Java. Link to curriculum?
>>
>>55723789
you want one that offers you multiple different languages and different things such as linux operating systems and programming in C Java C++ etc
>>
>>55723676
i would not say that most jobs are java jobs, even if it's a decent chunk of the market.
There are still around 30 C++ Jobs and even a monkey language like PHP has over 20 job advertisements.
>>
>>55723812
>inb4 Source is my 5 minute internet research.
>>
>>55723789
Teach yourself you dipshit. If you need a teacher to learn programmimg, don't even bother and do law or feminist studies instead.
>>
>>55723828
There is literally nothing wrong with women studies degrees.Women are the best programmers
>>
>>55723797
Unfortunately the curriculum is not in english so i don't think it will help much, but i talked to the course coordinator and he told me that this course would be java only.
>>
File: stem.png (305KB, 599x468px) Image search: [Google]
stem.png
305KB, 599x468px
>>55723836
gr8 b8 m8
>>
>>55723564
basic graph theory and basic combinatorics are more relevant than the things you mentioned (Abstract Algebra and PDE are particularly overkill for programmers)

data structures and algorithms on them are very important
>>
>>55723841
You'd better be prepared to learn on the side yourself. Java-only programmers are ten a bayonet, we don't even waste bullets on them.
>>
>>55723781
magma:
closure implies the result will be the same type, useful in statically typed languages, also means you use the operation to do a fold on a list

semigroup:
it's associative, so
a + b + c + d = (a + b) + (c + d)
>parallelism & concurrency
>can store "updates" and sum to get the final value

monoid:
identity element - can act as a default value

semiring:
* distributes over + - e.g.
525 + 125 = 25(21 + 5)
more efficient calculation (assuming finding the HCF is fast)
>>
>>55723843
It's true women are great logical thinkers and have been great mathematical contributors all throughout history
>>
>>55723781
>>55723860
group or full ring
(the invertability part)
>can "undo"
>can calculate the "difference" between two values
>>
>>55723807
I believe that would be more interesting, but the way the course coordinator explained why they were going for java only made me think if it was better to fully learn one programming language during 4 years or to scrap through multiple ones during the same time.
>>
Thinking about doing Software Engineering here, can you guys check through the course list and tell me what you think? https://www DOT uq DOT edu DOT au/study/plan_display.html?acad_plan=SOFTWX2342

replace dots with actual dots
>>
>>55723812
They told me this exactly, that java had the larger chunk of the market and that was one of the reasons for being java only.
>>
>>55723891
I personally think it's best to study multiple different ones while focusing on a main one so for example you would focus on java one semester second you would have C plus java other courses then switch to different ones databases algorithms etc
>>
>>55723860
This is why I despise CS courses and people. All this circlejerking for natural logical shit, just to give it more ooomf and make the people seem smarter than they are. I liked abstract algebra in HS because it made things more rigurous, but fuck this.
>>
>>55723828
But i need a fucking degree m8.
>>
>>55723922
I didn't do CS
>>
>>55723925
You need a Github filled with all your personal projects and social skills to persuade managers you are fit for the job or social skills for glorious Nepotism
>>
>>55723564
>>55723647
>>55723855

people use PDE in machine learning all the time. and as a programmer you should know some machine learning (or you will be expected to soon)
>>
>>55723926
You think like you did. This bullshittery is design pattern tier. Trying to slap in something that shouldn't be there, but you do it anyway cause it makes it meatier
>>
>>55723892
>replace dots with actual dots
No shit.

Seems like a pretty standard curriculum. What concerns did you have about it?
>>
>>55723957
it's just abstract algebra
why do you hate it so much?
you have something against giving a name to certain algebraic structures?
>>
>>55723919
My thoughts exactly, the problem is that the only courses i can afford right now are CS and Software Engineering and i was thinking that the latter would give me a better formation since its engineering.
>>
>>55720960
It's good practice to use triple quote in multiline strings like that. Backslash and \n look ugly, though this works for making single line strings in multiline code:

some_string = "blah blah" \
"more blah" \
"&c;"
>>
>>55723943
Degrees are almost obliged here if you wanna get a decent job.
>>
>>55723986
What country are you from?
>>
>>55723974
The problem is CS redefines everything to fit their narrow needs. It's kind of fucking annoying.
>>
>>55723943
Need to get that first job interview though, and past dipshit recruiters.
>>
>>55724008
that's got nothing to do with anything
i literally just pointed out the implications certain algebraic structures have in terms of computation
>>
>>55724003
Brazil :(
>>
>>55724003
Waziristan
>>
Any book recommendations for android application development? Looking for something that wasn't written for gingerbread.
>>
>>55724038
Big Nerd Ranch
>>
>>55724001
Since I don't have a degree (but I did take a few classes) everyone that interviews me assumes I'm a college student looking for an internship. When I say I'm not and I'm looking for a real job they ask if I have any questions and it's over.
>>
>>55724019
I don't know how things work in Brazil all I know is you guys have lots of 3d traps tons of 3d anime traps

>>55724009
which all requires a Github and lots of social skills I personally think it is more important to focus on ones communication skills than programming skills to get a good position
>>
>>55724052
Tbh i believe in self learning more than anything but my family would be utterly disappointed in me if i don't get a degree.
>>
>>55723925
Degree is overrated... hiring in CS is a fucking mess right now. I have more knowledge and skill than every software designer i meet, a better resume', and dont have obvious* autism or social ineptitude like every other programmer in the field, and even feign humility from time to time. I apply to 2-8 places a day, try to vary my cover letter tone, rework my resume' a little, and no one ever calls back. I have no idea what i am missing but i must be missing something...
>>
>>55724052
Fucking depressing. Why aren't we shooting up HR and mgmt, again?
>>
>>55724073
simple the thing that you think is overrated you know what to do get that imaginary paper
>>
>>55724038
Just look through some repos for android programs on github, if you already know how to program. Once you've done that, try forking one and adding to it, then start building your own once you've successfully done that.
>>
>>55724073
when you say...

>try to vary my cover letter tone

do you mean tailor it to the place you're applying?

e.g.

if they do Ruby, say how you made a blah blah gem... if they do JS, say how Babel is the bees knees or whatever

the type of programming doesn't necessarily matter but as long as they know you're interested in what they're doing to some degree and not just looking for a job
>>
>>55724100
I have a bachelors degree... from a decent school
>>
>>55724113
If it's Java I talk about my extensive Object Oriented Programming knowledge and how I think the paradigm of OOP is great for working in the team success of a company and holy shit I love Java so much
>>
>>55724113
I mean, i wasnt referring to that but i just cant accept that they wont even give me the call because "im just looking for a job"...
>>
>>55724073
>>55724069
currently work in the Bay area... degree isn't necessarily overrated. with it does come some expectations.

really know a scripting language, really know a static typed one

make like 5 really well polished projects in whatever the fuck field you want (web dev, gaemz, mobile, etc) and good things will happen
>>
>>55724129
You sound completely fake and insincere.
I wouldn't hire you either.

HR people over the age of 30 know when to spot people who just like to run their mouth.
>>
>>55724069
I need a job to even pay for school to get a degree. And if I went to a university I'd rather study something that isn't computer science or software engineering. Since I've taken courses in the past I know that I can self teach myself anything in the course in a much quicker time.
>>
File: ChocolateIceCreamDab.jpg (20KB, 551x552px) Image search: [Google]
ChocolateIceCreamDab.jpg
20KB, 551x552px
Anyone know color theory? I'm writing an edgefinding function and I need a function that can return the dissimilarity between two RBG values.

Obviously comparing RBG(1,1,1) to RBG(1,1,1) should return 0.
Comparing RBG(1,1,1) to RBG(0,0,0) should return 1 because white is 100% different to black.

But what about RBG(.5,.5,.5) compared to RBG(1,1,1)? Should that return .5 because grey is 50% white? Then RBG(.5,.5,.5) can never be >50% dissimilar compared to any other color?

What about RBG(0,0,1) compared to RBG(1,0,0)? Is green 100% dissimilar to blue?
How about RBG(0,0,1) compared to RBG(1,1,0)? Is green also 100% dissimilar to yellow?
How about RBG(0,0,1) compared to RBG(.5,0,0)? 50% or 100%?
Or RBG(0,0,1) compared to RBG(.5,.5,0)? 25% or 50% or 100%?
>>
>>55723892
imgur [DAWT] com [SLASH] gallery [SLASH] DBNMTfZ
>>
>>55724156
No, they don't have you seen how many idiots work in places they shouldn't? Checkmate btfo
>>
>>55724158
have you thought of a "coding school / bootcamp"? they're not 100% shit...

i'm >>55724141, they usually have a good work ethic which leads them to be a decent Jr Dev (though will take a bit to progress)
>>
>>55724201
salty af

hope you're trolling... wouldn't want to work w/ you either
>>
>>55724201
But you're still unemployed, neetboy.

>>55724206
these are only capable of churning out webdev retards who cannot implement anything that wasn't explicitly taught to them.
>>
>>55724177
you need to calculate some kind of "length" of the difference of the two vectors

here are a few examples

https://en.wikipedia.org/wiki/Norm_(mathematics)#Examples
>>
>>55724231
deep down you know I'm right
>>
>>55724240
lol, i have a job m8... you're welcome for my taxes paying your unemployment

>>55724235
real talk: yes and no.

the ones that "rise" are the ones that are willing to get out of their Ruby/jQuery comfort zone.

Our DevOps guy had a business degree, went to one of those things, started working in Rails or some nonsense but like 3 years later, pretty solid

but he actually "enjoys" learning and puts in the time

these stories ^ are few though, and yeah a lot end up "freelancing" making websites for their mom's friends bakery...
>>
>>55724235
>>55724276
I am a java software architect what do you do?
>>
>>55724281
"senior engineer" at a small startup of 20 people. really means, we have 5 engineers, 3 of whom know what they're doing, the other 2 need their hand held a bit

was at a social media company for about 6 years before

write Go, Ruby, JS all day
>>
>>55724008
I think the problem here is your autism
>>
>>55724312
>Go
>Ruby
>JS

Enjoy programming in meme languages and not superior ones like Java?

LaughingSystems.Exe
>>
>>55724236
There are a few types of "norms" in the article I can't figure out which to use.

Should I just subtract the RGB vectors, then get the length of the resultant vector, then divide that length by the max length (1root2)?

Should I first convert the RGB 0-1s to a normalized vector with the RGB values representing XYand Z rotation instead?
>>
>>55724345
are you >>55724129 ?

and if not trolling, try Go or Swift, if you're coming from Java, you'll like it
>>
>>55720551
which chainesse cartoon is this
>>
>>55724345
>software architect
>java
>meme
>.exe
>still using a deprecated, verbose language
lmao
>>
File: feels.png (121KB, 680x497px) Image search: [Google]
feels.png
121KB, 680x497px
>>55724367
double (You's) in one post
>>
>>55724366
https://en.wikipedia.org/wiki/Color_difference

says euclidean
>>
>>55724345
>superior ones like Java?
please, you are both script retards compared to hard working C++ professionals
>>
>>55724406
not all of us can (or want to) launch rockets, make games or a computer for a Toyota Prius
>>
>>55724366
just use this formula with the three dimensions

https://wikimedia.org/api/rest_v1/media/math/render/svg/dc0281a964ec758cca02ab9ef91a7f54ac00d4b7
>>
>>55724345
C/C++ master race
>>
Is this guy pretending to be tech-illiterate?
>>55724422
>>
>>55724422
Nice try Kim Jong Un
>>
>>55724383
himegoto
>>
damnit... i made the mistake of saying which languages i use

muh intelligence must be so easy to know based on what i do er'day

stay frosty /g
>>
Any boy in girls clothing can tell me why this doesn't work?
I thought this was how python worked.
>>
>>55724486
Well shit.
>>
lib should be .lib
>>
>>55724513
is for
>>55724504
>>55724486
>>
File: 1406803019377.jpg (103KB, 1280x720px) Image search: [Google]
1406803019377.jpg
103KB, 1280x720px
>>55724426
>C/C++
Why are you grouping two completely different languages together?
That's retarded.
>>
>>55724513
>>55724523
Closer?

Where should I be reading about this if I'm lazy?
I'm not gonna do much here in python really.
>>
>>55724547
>completely different
Anon I'm not that guy but if I use C++ but write it like it's C with function overloading (and no explicit typedev structs along with other similar small things).
What do I call that?
It bothers me a lot because I don't want to confuse people who have C++ madness.
>>
I've entered the world of code hell, /g/. One of our testers is finding a (somewhat) reproducible crash in our embedded tool. It runs Windows CE on an ARM processor, and after X amount of time running our app, could be an hour, could be 5 minutes, the processor throws a Data Abort error. Googling for Data Abort tells me that some kind of memory corruption has happened, somebody tried accessing memory from a location not owned by the process. The line spat out of the serial port lists a .NET DLL as the offender, so our best guess is that the garbage collector is trying to release memory it doesn't own. This is possible, since our backend is in C++, and sometimes we pass objects back and forth, but usually it's just native types like int, sometimes strings. But why would this happen so infrequently? And is there even a way to find out where this happens, without combing every inch of the C#/C++ interop layer? Some way to catch the offending code that does it?
>>
>>55724561
It's like I've forgotten how to post.

I don't see why it' complaining about the as.
>>
>>55724547
Because you can group things together, even if they're different.
>>
>>55724571
So, all of the Sepplesfags hate you because you're not writing modern C++, and all of the Cfags hate you because you're not writing C, but trying to act like you are.
Enjoy your missing C99/C11 features, and all of the inherent flaws that C++ has.
>function overloading
You can do this in C using _Generic, you know. I've never considered function overloading to be a particularly useful feature though.
>>
>>55724595
breakpoints everywhere
>>
>>55724603
import .lib.irc as irc_
>>
>>55724610
>everyone hates you
Yeah basically.
>I've never considered function overloading to be a particularly useful feature though.
Sometimes it's nice to have. I also do operator overloading for stuff like vector math etc. So I'm a bit more dirty than most C devs.
>>55724687
Yeah I tried that but it just keeps complaining unless there's a for and grammatically it'd make sense with from
>>
File: Screenshot_2016-07-23_19-43-29.png (114KB, 577x179px) Image search: [Google]
Screenshot_2016-07-23_19-43-29.png
114KB, 577x179px
Finished implementing stack functions for my VM, now I need to work on basic math functions.
>>
>>55724618
Yeah, basically code hell.

Although, I think maybe I can add a thread which constantly calls the garbage collector. At least then the blow up would happen closer to the offending interop code.
>>
>>55724718
>chris@Deathconsciousness
What a gay hostname
>>
>>55724919
Apologize to my computer right now
>>
>>55724919
spotted the lifeconsciousness
>>
>>55724595
I don't deal with legacy code but if I had an incredibly hard to find memory bug I'd just preprocess the code to make every memory-allocation use my own memory allocation structure which I can easily log for.
>>
I just made 3k setting up a wordpress website for a local business owner and did a tiny bit of programming and file configuring
>>
>>55724941
Fuck you, computer
>>55724942
Mine is hairy-ass
>>
>>55724965
Sometimes I'm wondering if being NEET is worth it when money is so easy to make.
>>
>>55724977
It's very easy to make money you just have to be creative thinking outside of the box to do it
>>
>>55724977
this is dpt
it's very easy to be a NEET and make money online
contract/freelance work doesn't count as employment
>>
>>55725007
>>55724992
Yeah but I get money from the government and any earnings are pure 'waste' (any earnings I have I get less in support, unless earnings exceed support, 3k$ would do that though). I get the happy feeling of supporting my state.
>>
>>55724603
>>55724687
>>55724715
Solved it. I guess you can just common sense your way through this afterall.
>>
NEW THREAD!!

>>55725065
>>
>>55725074
Dumbass
>>
File: Sif.gif (35KB, 230x200px) Image search: [Google]
Sif.gif
35KB, 230x200px
BRINGING THIS THREAD TO 310
>>
So I'm learning C++, having used Java and a little C before.

I take it getters are not so much used in C++ as Java? Should I use public member variables instead?
>>
>>55725288
No, you generally want to hide your data members. The C++ community isn't as religious about it as in Java, but it's still a good practice.
>>
>>55725745
Doesn't using functions to access data cause more overhead (having to allocate space from the stack etc)? Obviously not an issue for smaller programs, but isn't this something to be considered when dealing with a lot of data?
Thread posts: 314
Thread images: 27


[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.