[Boards: 3 / a / aco / adv / an / asp / b / biz / c / cgl / ck / cm / co / d / diy / e / fa / fit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mu / n / news / o / out / p / po / pol / qa / r / r9k / s / s4s / sci / soc / sp / t / tg / toy / trash / trv / tv / u / v / vg / vp / vr / w / wg / wsg / wsr / x / y ] [Home]
4chanarchives logo
/dpt/ - Daily Programming Thread
Images are sometimes not shown due to bandwidth/network limitations. Refreshing the page usually helps.

You are currently reading a thread in /g/ - Technology

Thread replies: 255
Thread images: 26
File: 1413802848890.jpg (46 KB, 400x438) Image search: [Google]
1413802848890.jpg
46 KB, 400x438
Previous thread at >>52028609

What are you working on, /g/?
>>
First for D
>>
>>52033619
Second for Go is useless, F# is perfect.
>>
File: fibonacci spiral.png (4 KB, 220x139) Image search: [Google]
fibonacci spiral.png
4 KB, 220x139
         EMEMEMEMEMEM     
EMEM EME
MEM MEM
EME E
EM ME
EM EMEM MEM
M MEM EME
E EMEM
>>
Threadly reminder: ocaml is the only good language.
>>
             tPdtPdtPdtPdt              
PdtPd PdtPd
Pdt tPd
Pdt PdtPdtPdtPd tP
dt tPdt tPdt dtP
tP Pd dtPdtP Pd d
Pd dt PdtP dtP tP tP
t tP dt dtPdtP dt dt d
Pd d P P Pdtd P dP t
td P t td Ptd Pt dP
P td dP PtdPtd td t
td Pt tdP PtdP tdP
Pt dP tdPtdPtd dP t
dP tdPt tdPt dP
td dPtdPt tdPtdP dPt
Ptd dPtdP dPt
Ptd tdPt
PtdPtd dPtdP
PtdPtdPtdPt

>>
>>52033619
>What are you working on

dethroning John Carmack as the Pussy Snorkeling World Champion
>>
>>52033653
you can't trick me pizza man
>>
>>52033646
Tell me about D
>>
>CLRS uses arrays that start with an index of 1
>mfw I can't implement merge sort correctly because of this
am I retarded
>>
>>52033679
It's big and hard.
>>
>>52033700
Yes.
>>
File: out.webm (3 MB, 1920x1200) Image search: [Google]
out.webm
3 MB, 1920x1200
i'm working in a wallpaper manager GUI for a little script called wp, wich takes a colorscheme out of an image and sources it to a .Xresources file, wich determines the colors of your terminal
>webm related

if you wanna check it out:
http://github.com/deviantfero/wpgtk
>>
>>52033619
How do I implement a GC?
>>
>>52033789
pretty incredible
>>
>>52033710
knew it
I just don't know what's fucking going wrong lmao

Alright, just threw some prints in, should be able to fix it now~
>>
>>52033700
>for (i = 0; i < x; i++)

becomes

> for (i=1; i <= x; i++)

How difficult.
>>
>>52033803
Look up chicken's Cheney-on-the-MTA code.
>>
Dropped working on porting the whole aubio library over to Go. I ain't gonna test all that shit nigga. So I'll just port of the stuff I need which is a fraction.
Have a look at the beautiful syntax Haskell faggots and C# aspies:
package aubio

// #cgo LDFLAGS: -laubio
// #include <aubio/aubio.h>
import "C"

import (
"errors"
)

// Source is a wrapper for aubio_source_t.
type Source struct {
ref *C.aubio_source_t // Native reference.
buf *C.fvec_t // Input buffer.
}

// NewSource returns a new Source instance.
func NewSource(uri string, hopSize uint) (*Source, error) {
auri := astring(uri)
defer delAstring(auri) // only used in new_aubio_source

// use file sample rate
ref := C.new_aubio_source(auri, 0, C.uint_t(hopSize))
if ref == nil {
return nil, errors.New("aubio: new_aubio_source nil")
}

buf := C.new_fvec(C.uint_t(hopSize))

return &Source{
ref: ref,
buf: buf,
}, nil
}

// Reads reads the next chunk of decoded audio.
func (s *Source) Read() (*C.fvec_t, uint) {
var aread C.uint_t
C.aubio_source_do(s.ref, s.buf, &aread)
return s.buf, uint(aread)
}

// Close cleans up Aubio resources.
func (s *Source) Close() {
C.del_fvec(s.buf)
C.del_aubio_source(s.ref)
}
>>
>>52033821
lol, that really is it, there's nothing else to it, gee I'm so stupid, thanks anon!!!!!!!!!!!!!!!!!!!
>>
File: 1437319911642.jpg (53 KB, 450x582) Image search: [Google]
1437319911642.jpg
53 KB, 450x582
>>52033673
Daily reminder that women know how to computer.
>>
>>52033789
It's useless because it just picks a bunch of different shades instead of generating a proper colorscheme with distinguishable colors

Better fix wp before anything
>>
>>52033833
Yes, exactly.
>>
>>52033830
Anything audio related is very latency sensitive. A GC is only going to get in your way.
>>
>>52033841
really depends on the wallpaper though
>>
>>52033835
Women are a meme, anon
>>
>>52033841
but i'll try
>>
>>52033861
The decoded audio is only used to analyze and the application exits when done analyzing. It's not being played.
So it doesn't matter how long the process takes or how many times the GC stalls the application.
>>
>>52033830
>>52033861

>using a GC for audio
>No optimization

http://forum.dlang.org/thread/[email protected]
>>
>>52033789
Leaves and forest wallpapers please


Can't tell if they are default or not. Freetard dists come with so much better wallpapers than Windows does
>>
>>52033957
>distros come with better wallpapers
Which ones? It's always some plain one with the logo in the center.
>>
>>52033976
xubuntu for instance

http://www.omgubuntu.co.uk/wp-content/uploads/2014/01/fsvh_bubbles.jpg

http://img11.deviantart.net/1356/i/2013/012/7/1/cloud_breaker_by_photonfossil-d5rc6dt.jpg

They are pretty mellow and have a distinct colour theme, so it is easy for text of the same colour to be visible anywhere on the image
>>
File: dn4j9uD.webm (188 KB, 640x360) Image search: [Google]
dn4j9uD.webm
188 KB, 640x360
Ask your beloved programming literate anything.
>>
>>52033935
My code uses libav and fftw.
I find the D documentation a big mess and the syntax resembles C++.
>>
>>52034040
What was the name of your first girlfriend?
>>
>>52034040
since when do snakes eat lettuce?
>>
File: 200_s.gif (25 KB, 293x200) Image search: [Google]
200_s.gif
25 KB, 293x200
>>52033619
I'm working on optimizing my circle drawing algorithm even though I can already draw over 12,000 anti-aliased 800x800 circles per second in software in higher than 16x MSAA quality
on Christmas
>>
>>52034127
That's not a snake it's a battletoad you moron.
>>
>>52034144
what is a battletoad?
>>
Is there a tutorial on how to use modern C the "correct" way?
>>
>>52034155
It's a common garden toad native to new zealand. They are known for their very aggressive and territorial males. There was an NES game based on them.
>>
>>52034158
C Programming: A Modern Approach
or
C Primer Plus
>>
>>52034158
>modern C
oxymoron
>>
>>52034202
Wasn't there a new release in 2011?

Anyway, I want to learn C so I can interface with it from other languages and/or port libraries if needed.

I'd like to not miss out on some of the small/obscure libraries available for C, but also code in an actually good language most of the time.
>>
File: 1450919054098.jpg (72 KB, 994x600) Image search: [Google]
1450919054098.jpg
72 KB, 994x600
>>52034202
>>
Functional programming: is worth or just a meme?
>>
>>52034241
By that logic, you should be programming in COBOL 2014.
>>
>>52034259
both. It's great, but just don't expect recruiters to be knocking your door down because you learn an FP language.

Also just remember that pure FP is utterly useless. Avoid languages like Haskell, learn languages like Ocaml and F#.
>>
File: out.webm (2 MB, 1280x720) Image search: [Google]
out.webm
2 MB, 1280x720
>language shitposting


Time for Fizzbuzz. Limited IC edition.
>>
>>52034259
main = do
putStrLn "Yes"
>>
>>52034290
so this is the power of EE
>>
>>52034329
no
>>
>>52034357
oh
sorry
>>
>>52034123
Brenda
>>
>>52034290
i'd be more impressed if you didn't use the bloated arduino libraries that eat up hundreds of instruction cycles each.
>>
I've fallend in love with an obscure, dead language.
Hold me, /g/.
>>
>>52034652
iktf
What's your language waifu? Mine's COBOL
>>
How important is unit testing with something like Nunit?
>>
>>52034288
>Also just remember that pure FP is utterly useless.
Nah. I enjoy being able to quantify side effects so that I can use a function safely.
>>
>>52034652
C ?
>>
>>52034652
Java?
>>
>>52034633
>i'd be more impressed if you didn't use the bloated arduino libraries that eat up hundreds of instruction cycles each.
>doesn't even blink an LED more than 3 times per second

Who the fuck cares m8. Besides you can use direct port access and get things fast enough anyway.
All I/O is a bottleneck, of course things are going to be slowed down.
>>
>>52034665
Mine's Ada and Pascal.
Wirthian languages in general are so comfy.
>>
>>52034666
Very important if it's not just a little personal project
>>
File: download.jpg (37 KB, 600x450) Image search: [Google]
download.jpg
37 KB, 600x450
>>52034666
>>
>>52034103
>using libav unironically
Ayy
As expected from a gotard.
>>
>>52034158
Yes, uninstall.exe
>>
>>52034776
>writing your own poor solution
Ayy
As expected from a shitposter.
>>
>>52034726
I'm having a hard time getting a grasp of it, I'm reading "Pragmatic unit testing in C# with NUnit" and with my experience being only small personal projects, it's looks to me too complicated for what it's worth, on top of that I wouldn't say the book does a great job at explaining things

Any recommended resources to learn to use NUnit?
>>
>>52034811
omg gro, you totally got him
>>
>>52034811
>being clinically retarded
Lmao
As expected from a gunhgo
>>
>>52034811
>what is literally every not-absolute-dogshit audio library out there
>>
File: tumblr_nhi5z7gfIm1tjgejbo1_250.gif (993 KB, 200x200) Image search: [Google]
tumblr_nhi5z7gfIm1tjgejbo1_250.gif
993 KB, 200x200
>>52034837
>>
File: forest.jpg (529 KB, 1920x1080) Image search: [Google]
forest.jpg
529 KB, 1920x1080
>>52033957
no they are not default, i added them myself will drop leaves and forest
>>
File: tree2.jpg (2 MB, 1920x1280) Image search: [Google]
tree2.jpg
2 MB, 1920x1280
>>52033957
leaves ? i guess you meant this
>>
>>52033789
Would be cool if it also configures your i3 color scheme. Legendary if it generates a matching GTK theme.
>>
File: ;D.png (57 KB, 800x334) Image search: [Google]
;D.png
57 KB, 800x334
>>52033679
What would you like to know?
>>
>>52034824
I've never worked with NUnit, I don't know that book either. I have worked with various other xUnit unit testing frameworks. Unit testing is pretty simple to get the hang of and can be pretty fun, it does feel very excessive when doing it on smaller projects. I haven't learned how to unit test from a book, I learned it by doing a project. If I were to recommend something then it's
http://www.nunit.org/index.php?p=quickStart&r=2.2
It's outdated (for version 2.2 vs 3.0 now), but it's probably pretty similar to how you would do it now in NUnit and visual studio will probably correct you if it's wrong.

It's important you have a good test coverage and that you test everything that could go wrong with a method. If you know how to do unit testing after a while, you can soften up on that. Use plenty of asserts, little bit of mock objects and fixtures. Look up what those three things mean if you don't already know.
>>
>>52033935
If I understood it correctly D has thread local storage by default. Does that mean every thread has it's own GC? What I'm asking is if I allocate nothing in one thread but a lot in a second thread the GC will only pause the second thread?
>>
>>52035129
https://dlang.org/spec/garbage.html
https://dlang.org/migrate-to-shared.html
>>
>>52035129
Enjoy your GIL :^)
>>
>>52035095
thanks a lot I'll take a look at that
>>
New friend in Java, first programming language. Noticed that I had read two chapters but had trouble applying shit so I figured practice makes perfect.

Went back to the for loops in Chapter 1, decided to try and make a for loop for Celsius to Kelvin conversion. Thing is it doesn't print out all of the conversions, just the last one. Not sure why.

public class dankMeme {
public static void main(String[] args) {
int dC, dK = 0;
for(dC = 0; dC < 100; dC = dC + 1)
dK = dC + 273;
System.out.println(dC + " degrees Celsius is " + dK + " degrees Kelvin. ");

System.out.println("Done.");
}
}
>>
Howdy fuckers.
>>
>>52035454
start from the beginning of the book again
for (i = 0; i < 10; i++)
dothing(); // done 10 times
do_other_thing(); // done after loop

for (i = 0; i < 10; i++) {
do_thing(); // 10 times
do_other_thing(); // 10 times
}
>>
>>52035458
https://www.youtube.com/watch?v=21EA2F3Y8Lk
>>
>>52035477
God dammit, alright. Thanks anon. Hate how none of this shit sticks in my head most of the time, just got ADHD meds feel like it helps me focus, but I don't know ;_;
>>
Why is there so many features in C#? How do I understand and remember them all?

And is it cheating to more or less copy code when you're trying to make something? I understand how it works but there's no way to "write it myself" without it looking identical.
>>
File: vaccine.png (478 KB, 3200x1745) Image search: [Google]
vaccine.png
478 KB, 3200x1745
cleaned up autoconf stuff
>>
>>52035502
take notes; dont just read through it
>>
Trying to learn android development so I have industry relevant skills.
>>
>>52035503
>Why is there so many features in C#? How do I understand and remember them all?
lel and Csharts won't admit that java is cleaner/simpler/more elegant than C#
>>
>>52035503
Trying to memorize the standard library (.Net) is pointless. Just learn the language features.
>>
>>52035503
try C++

and if it's something really basic, no
>>
>>52034569
Brenda Utthead
>>
>>52035504
good work ben
I remember trying to build it a while ago and I was missing something that I couldn't easily get with my package manager, but I'll give it another shot
>>
>>52035539
>Trying to memorize the standard library (.Net) is pointless. Just learn the language features.

I guess that makes sense. I suppose after a while I'll eventually just remember what arguments some functions take and what they return and such, right?

Because at first it's really overwhelming and I often have to look on stackoverflow and such to understand.
>>
>>52035569
>what arguments some functions take and what they return and such
you should have those things right there in your IDE
>>
>>52035576
>IDE
hahahahahaha
>>
>>52035454
I know that the other anon wants you to learn it rather than have me teach it to you but I'm going to share something with you anyway.

The special keyword functions like for and if and while only do the expressed commands located within the pair of brackets that are tied to them.
for( yadda yadda )
{ this stuff ]


Otherwise, if you don't supply the brackets the keywords function can only reach the next command. In your case, that would be the
int dK = dC + 273;


Hope I didn't make you too lazy.
>>
>>52035584
There's no reason to write C# without an IDE.
>>
>>52035590
this
>>
>>52035576
Well yeah but I mean like actually understanding how it works.

Because I was kinda confused using DownloadFile() at first, i thought the filename parameter was suppose to be what you wanted to save the file as.
>>
>>52035556
I think you need a recent version of GTK
>>
>>52035590
Sad but true. Same applies to Java. Thankfully, I don't know of any other language for which this is true.
>>
>>52035601
That's what documentation is for.
>>
>>52035609
>Sad
kill yourself
>>
>>52035609
What is wrong with IDEs?

Why is /g/ so fucking autistic?
>>
>new minor version of popular library released
>it's literally incompatible with itself
>its API is completely different from the previous minor version
>nothing fucking works anymore
>documentation not updated
>ambiguous or wrong inline documentation everywhere
P Y T H O N
Y
T
H
O
N

Community
>>
>>52035621
>>52035620
>>>/tumblr/
>>
>>52035621
>muh linux
>muh text editor
>muh command line
>muh 1337 hax0rz
>>
File: IMG_20151219_215005174.jpg (1 MB, 2592x1456) Image search: [Google]
IMG_20151219_215005174.jpg
1 MB, 2592x1456
I wanna make a program in C# that talks to a circuit board I made through a HID protocol.

I know how to do everything but... which version of Visual Studio am I supposed to download? The last time I used it, it was just Visual Studio 2008 and it worked. Now there's "Community" and "Code" and whatever and none of that allows me to type in code and compile the damn thing.

Help me out, /g/?
>>
>>52035635
Nice argument.

Is it just being le edgy contrarian NEET?
>>
>>52035621
/g/ has merely adopted the autism. /dpt/ was born and molded by it
>>
>>52035626
and that's just one of the reasons why python is shit
>>
>>52035602
It's actually giving me this --
  make -j`nproc` run
VALAC vaccine_vala.stamp
glib-compile-resources --sourcedir=ui --generate-source --target resources.c ui/resources.xml
CC vaccine-resources.o
src/Thread.vala:3.39-3.47: error: The type name `ListModel' could not be found
public class Vaccine.Thread : Object, ListModel {
^^^^^^^^^
src/PostReplies.vala:3.44-3.52: error: The type name `ListModel' could not be found
public class Vaccine.PostReplies : Object, ListModel {
^^^^^^^^^
src/view/ThreadPane.vala:17.28-17.36: error: The type name `ListModel' could not be found
public void set_model (ListModel model) {
^^^^^^^^^
Compilation failed: 3 error(s), 0 warning(s)
make: *** [vaccine_vala.stamp] Error 1
make: *** Waiting for unfinished jobs....

I'll update stuff I suppose
>>
>>52035660
glib 2.44 at least
>>
>>52035639
>I know how to do everything but... which version of Visual Studio am I supposed to download?

Visual Studio 2015 community.
>>
>>52035639
>want to make a C# program
>which version of Visual Studio
It's evident you don't regularly use C#, so why C#? Probably the least handy to do this in.
>>
>>52035658
>/g/ has merely adopted the autism. /dpt/ was born and molded by it

Certainly seems like it.

>Post legitimate question for a real-world application
>0-2 replies, maybe le troll meme answer

>Make post about some small shit that doesn't even matter
>50 replies arguing back and forth
>>
Anybody getting anything interesting for Christmas?
>>
>>52035675
noice
>>
File: bloat.png (69 KB, 1366x695) Image search: [Google]
bloat.png
69 KB, 1366x695
>>52034633
Who cares about code bloat when you have 256 kbytes of flash memory?
>>
>>52035699
a trip filter
>>
>>52035677
That thing won't even download properly, let alone be useful for anything

>>52035686
I'm not a CS major and I don't care for microsoft's web 2.0 appz whatever, I just want to write a C# application, how hard could that be?
>>
>>52035696
>The concept was first presented as a corollary of his broader "Parkinson's law" spoof of management. He dramatizes this "law of triviality" with the example of a committee's deliberations on an atomic reactor, contrasting it to deliberations on a bicycle shed. As he put it: "The time spent on any item of the agenda will be in inverse proportion to the sum [of money] involved." A reactor is so vastly expensive and complicated that an average person cannot understand it, so one assumes that those that work on it understand it. On the other hand, everyone can visualize a cheap, simple bicycle shed, so planning one can result in endless discussions because everyone involved wants to add a touch and show personal contribution.
Basically, most people aren't skilled enough to comment on intermediate/advanced issues so they talk about meaningless shit instead, since they can contribute.
>>
>>52035738
>That thing won't even download properly, let alone be useful for anything

I am using it right now and it works perfectly.
>>
>>52035738
What? You didn't even answer my question. I asked why you wanted to use C# in the first place.
>>
>>52035722

But that's free, and it works right now.
>>
>>52034329
kek
>>
>>52035699
Types and Programming Languages. Helps that I have quite a bit of my family in CS and mathematics.
>>
>>52035743
>Basically, most people aren't skilled enough to comment on intermediate/advanced issues so they talk about meaningless shit instead, since they can contribute.

Sounds like 4chan.
>>
Anyone with VS mind testing a novice's first program?

https://github.com/sirdoombox/Musick

It's just a media player, I think it's a pretty nice one at the very least, it's very early on (about a day or so) but the very core is there. Just want some feedback because I'm not too confident.
>>
>>52035775

I might have to take a look at something like that. The fancy bits and bobs of type systems evade me.
>>
Hi, this js file was in a spam mail i just recieved , does someone knows what it s supposed to do ?

http://pastebin.com/R9yR6Q4z
>>
>>52035751

Because there are tons of documentation and examples on how to implement something that talks to HID devices. Also I'm not going to learn a new language, I'm too old for that shit.

>>52035747

I'll give it a third chance then. It wasn't always a 3 gb download...
>>
>>52035639
Code is just an editor, either get community or desktop.
>>
>>52035711
>Using full blown AIDS IDE to write the most basic Arduino code

Shiggy diggy do. Just use notepad++
>>
File: failed.png (28 KB, 462x644) Image search: [Google]
failed.png
28 KB, 462x644
>>52035834
This piece of shit won't even download.

What alternatives are there to VS?
>>
>>52035711
Code complexity != Code efficiency
>>
>>52034998
this looks horrible desu
>>
>>52035868
The alternative would be not using C#.
Visual Studio is the only reason anyone should want or need to use C#.

Please don't confuse me for someone who would recommend java instead, I'm not that cruel.
>>
>>52035868
linux
>>
I'm sick to death of using VS2015 as my IDE, is there some form of plugin that would allow me to code in a less disgusting environment?

I need all my hand-holding stuff, I just want a less shit place to have my hand held.
>>
>>52035917
>The alternative would be not using C#.

Mono is fine.
>>
>>52035922
see >>52035919
>>
>>52035868
>Being too stupid to install a simple program

Well, i see no alternatives, not for someone like you i guess
>>
>>52035932
It should be fine, we'd all like it to be fine.

But we all know it is not yet "fine".
>>
>>52035659
Oh you mean cause it changes more often than a white woman changes her mind?

>PYTHON

> STAMP OF APPROVAL

>White women laughing
>>
>>52035944
>Plugin
>Handholding
>C#

I just want to be able to open my class files within VS and not be greeted by a tiny window surrounded by shit I don't need.
>>
>>52035873

Have you ever tried to use Cypress PSoC designer? It produces the most bloated code imaginable, but no one cares because all it will do is control a toaster or a microwave oven. Also, using the arduino libraries is just better readable than PORTB ~= 0B00010101 whatever or learning AVR assembly language.


>>52035917
How about an older version of Visual Studio?
>>
>>52035868
Werks for everyone else.

>>52035922
>I need all my hand-holding stuff, I just want a less shit place to have my hand held.

What exactly is so "shit" about Visual Studio?

You didn't even explain why it's a "disgusting environment"... It works perfectly fine, it's great. Seriously fuck this stupid NEET board
>>
>>52035977
it complies telemetry into my executables
seriously
>>
>programming with anything other than vim + compiler in your favorite shell
dropped
>>
>>52035954
>But we all know it is not yet "fine".

It's better than not fine, though.
>>
>>52035977
I sat here for a good few hours today programming, and I was stuck editing in a shitty window with terrible whitespace controls and no customisability.

If I'm gonna sit here all day coding away I want it to be a more enjoyably experience.
>>
>>52035991
>it complies telemetry into my executables

No it doesn't.
>>
>>52035699
A desk and somewhere to put it so I can work on my code and not have to change my seating arrangement every 15 minutes just so I don't get back aches for a week. I think it might help the head aches too cause now I won't have to face the light bulb when I'm focusning on my work!

Desk would be nice.
>>
>>52036037
ibmlying you would know
>>
>>52036000
t. NEET who has no social life and no job.
>>
>>52036051
hope you get one anon, sounds great

>>52036062
uni student and intern at big name company, had linux and git on my resume
>>
>>52035621
I dislike IDE's because I don't need all the extra shit, just a compiler and a text editor
>>
>>52036054
Proof?
>>
>>52035699
TAOCP 1 - 4A
>>
>>52035853
It helps with maintaining (relatively) large code
>>
>>52036096
the burden of proof is on you, you claimed they didn't
im not the anon that said they did by the way
the objectively correct stance is that you don't know if they do or not
and how could you think they dont these days
>>
>>52036096
compile a helloworld and open it in ida
look at the names view
>>
>>52036127
can you just show us the names view
>>
>>52036125
>the burden of proof is on you, you claimed they didn't

What? The burden of proof is on the person who made the claim.

It's like saying "Prove that God DOESN'T exist".
>>
>>52036166
He said they do do it.
You said they don't.
To rationally believe either, you need proof.
Obviously if you have none, you can't assume either.
>>
>>52034929
i don't use i3, so maybe that'll never be implemented but if you want to do it go ahead you're free to use and modify the code to your liking, but please link me in the description of it or something
>>
>>52036194
If you're making a claim you need to prove it.

That's like saying "Arch Linux is a botnet, prove me wrong fags". So now they have to go through every single line of code to prove it's not rather than the person making the claim pointing out where exactly it is?
>>
>>52034670
I never said it wasn't enjoyable
>>
>>52035743
Meanwhile in reality, what's happening is that the "legitimate" "real-world" "questions" are so hopelessly retarded or inane, yet vanilla, that everyone passes them over. Meanwhile, posts designed to foster discussion, foster discussion. Wow, who would've thunk!
>>
>>52036403
It's only useless if you conflate "pure" with "no side effects", which simply isn't true.
>>
>>52035908
haters gonna hate
>>
>>52036434
>define:pure
>adj. No side-effects
>pure doesn't mean no side effects guys!!1
>guys? Why are you leaving? PAY ATTENTION TO MEEEEEEEE!
>>
>>52036465
Pure doesn't mean no side effects, it means that every time you call a function with the same input you get the same output. If whatever you're side effecting is modeled with the input and output, purity admits side effects.
>>
>>52035504
>GTK
please don't do this
>>
>>52036127
>compile a helloworld and open it in ida
>look at the names view

Well idiot?

Are you going to prove us all wrong or what?
>>
Getting into C and implementing different data structures. Currently getting cucked by linked lists.
>>
>>52035699
I bought myself a new laptop
>>
>>52036509
>Currently getting cucked by linked lists.

They're garbage, anyway. You aren't missing much.
>>
>>52036648
How do I learn C#
>>
>>52036648
Is there a drop-in replacement for linked lists? Don't Haskell and Lisp use linked lists in their source code?
>>
>>52036434
What does pure fp mean to you then?
>>
>>52036673
>Is there a drop-in replacement for linked lists?

Any other list type. Arraylist, for instance.
>>
>>52036499
You need to be 18 or older to browse 4chan.
>>
>>52036661
The usual way, get books and study them, practise, do assignments, complete online courses, etc
>>
>>52036693
>>52036499
>>
>>52036699
Am I wrong?
>>
>>52036673
No. Linked lists are bar none the most useful data structure in computer science. They're what is used to implement heaps, stacks, queues, and as the secondary data structure of hashmaps. It's just an ebin maymay that linkedlists are bad. Then again, what the fuck are you doing, listening to a tripfag?
>>
>>52036726
>using a linked list for stacks, queues, or to implement a hash map
Delete yourself.
>>
>>52036702
How much copying others code is allowed? Should I be trying to do it all myself?
>>
>>52036661
Do what I do. Pick a simple application you have some ideas for, then try to make that application work.

Helps keep you motivated if you've got something tangible that actually does something. And it helps having a frame of reference for how that thing should function.

Make an imageviewer or something, then add features to it, like cutting sections of images together or any other random thing.
>>
>>52036499
And where did you find this oddly specific definition of pure FP?

Even this much is still retarded.
>>
>>52036726
>Linked lists are bar none the slowest data structure in existence
fixed
>>
>>52036760
I get that but I'm essentially copying code snippets from stackoverflow or MSDN examples... Feels kind of like cheating and I'm not learning much.

Is that normal in the starting stages of programming?
>>
>>52036753
Why do you want to copy other peoples code?
>>
>>52036726
>They're what is used to implement heaps, stacks, queues
They can be used to implement those things. That doesn't mean it's always a good idea.
>>
>>52036841
>Why do you want to copy other peoples code?

I don't but lets say I can't figure out how to do something, I'll google it and look at someone's solution on stackoverflow and then get it done... What else am I suppose to do?
>>
>>52036833
https://en.wikipedia.org/wiki/Cargo_cult_programming

Try not to make it a habit.

Read it, then type it out. Yeah it takes a bit of extra time but the actual act of typing it out and processing it in your mind helps you retain the information far better.

Soon you'll have all of the basics down, and you'll know when it happens because you'll be spending a lot less time in Google.

Once you've finished/gotten bored of your first app, take what you've learned and apply it to another project, add onto your knowledge and use your first project as a reference.
>>
>>52036803
Where did you find a definition that contradicts this?
>>
>>52036890
>>52036833
Oh and before you move onto the next thing, go back through all your code and try to clean it up, try to bunch common code together into methods and shift things into more logical classes.
>>
>>52036505
its too late
also gtk is p cool
>>
>>52036890
I do type it out but I just mean that I feel as if I didn't come up with the way to do it myself I'm not learning anything.

Like i was watching a youtube video about how to download files and also check for any errors such as page not being reachable, not having permissions to access file, etc. And I just don't get how I'm suppose to know all that without first watching some other guy do it and tyhen just filling in what I need and remembering for later.
>>
>>52037011
>I do type it out but I just mean that I feel as if I didn't come up with the way to do it myself I'm not learning anything.

We use a lot of things that other people came up with. Data structures, algorithms, the whole bit.

Whether or not you 'came up with it' is immaterial. What IS important is whether or not you understand WHY it works.

That is what you should be focusing on.

Good luck, and god speed.
>>
>>52037011
>And I just don't get how I'm suppose to know all that without first watching some other guy do it

That's how knowledge works, you can't just spontaneously inherit this knowledge, as long as you spend some time genuinely thinking about what you're doing and trying to understand how it works, then you'll be fine.

We all started somewhere, even the turbo-autists who post here.
>>
>>52036089
you forgot manpages or other local source of docs
>>
>>52036820
Linkedlist are orders of magnitude faster when the application requires many add/remove operations and few random gets, which is precisely the point of queues, stacks, and the hash collision or fragment lists. They're much faster for heaps because of random, addressed operations on elements being O(1) and not O(n).
>>
>>52037060
>>52037080
Thanks family.

So is it fine to google how do I do ___ C#? It seriously feels as though I'm just using other people's code then filling in what I need... Feels kinda weird tbqh
>>
>>52035699
a freelancing project that is practically impossible... one that I was naive enough to take.
>>
>>52037080
The great majority of the turbo-autists on here are still at the starting line. They keep moving back and forth a step across the line for some reason. I don't think they quite got the rules of the game here.
>>
>>52037240
>So is it fine to google how do I do ___ C#?

Yes. Everyone does that. Usually those kinds of searches lead you to the MSDN (the reference documents for C#) and there you go.
>>
>>52037240
Welcome to literally the only job requirement for most entry-level programming jobs.

If you know what need to do in order to achieve an end result, and know how to find it on Google, then you're already more than qualified.
>>
>>52037291
Wouldn't that make everyone qualified then?
>>
>>52037240
If you feel bad, spend some time learning about design patterns and good programming practices in general. You can apply that shit to everything you do. But yeah, for small shitty problems that you know 1000's of people have figured out before you have, you might as well google of a solution.
>>
>>52037320
Nope. 50% of the world can't do half that. 75% of the world can't do all of that.
>>
Creating a new object.

Object newObj = new Object(){
Value1 = variableValue1,
Value2 = variableValue2,
Value3 = variableValue3
};


or

Object newObj = new Object(variableValue1, variableValue2, variableValue3);
>>
>>52037320
no. Plenty of people are shit at programming even with google at their disposal. At the very least you need to learn most of the language by yourself first to get anything done.
>>
>>52037354
Always the second.
>>
>>52037354
it depends on the Class. If the latter is supported, better to use that. It's probably what the class expects.
>>
>>52037360
Explain.
>>
>>52037291
the only job requirement for entry-level programming jobs is a college degree in CS or similar
whether you can actually write usable software or not is irrelevant, you can just google and copypaste everything from stackoverflow when the going gets tough
>>
>>52037273
>>52037291
>>52037333
>>52037324
>>52037356
Well fuck. And here I thought all programmers were some super nerds who knew the inner workings of their machines and wrote their own compilers.

Feels a lot like everyone is just copying and doing whatever needs to be done to get it to work then...
>>
>>52037371
It's basically what everyone expects, and the first is wasteful in terms of performance, though not really significantly.
>>
>>52037374
>you can just google and copypaste everything from stackoverflow when the going gets tough

>Highly paid professionals

That leads me to my next question... Why THE FUCK do people on stackoverflow do it for free? Are they all the Custodian Canine IRL?

I was looking at some threads... people completely did complex work for someone who no doubt made a bunch of money from their work. And they don't even ask for compensation?
>>
>>52037383
>It's basically what everyone expects
Not a good reason.

>>52037377
Good programmers are.
Entry-level programmers are not.
Entry-level programmers are code-monkeys, they follow patterns and hack together snippets to make things work. Which is great, because that's all they need to do. They need to get the thing to work, not necessarily write it well.
>>
>>52037377
All that changes with experience is an increase in the amount of time and difficulty to find a solution to your particular problem.
>>
>>52037377
>Well fuck. And here I thought all programmers were some super nerds who knew the inner workings of their machines and wrote their own compilers.
I thought this too. But let me absolutely assure you... not only is this not the case... but when you get your first job, you will be absolutely SHOCKED with how shitty the highly paid shitty programmers you work with will be. Even though I'm telling you, you probably won't believe me until you see it. But just brace yourself.
>>
>>52037407
Then for the second reason. It doesn't require the object to get it to a default state and then change things up, it'll just start off the right way.
>>
File: 2015-12-24_15-50-25.png (17 KB, 489x535) Image search: [Google]
2015-12-24_15-50-25.png
17 KB, 489x535
Why is learning a new programming language so boring? I guess I should try to make something fun instead of following bullshit book examples.
>>
>>52033789
What window manager are you using?
>>
>>52037406
internet brownie points
seriously, it just makes them feel good and I guess they brag about it on their resumes
>top rated professional user on StackOverflow for 3 years running :)

>>52037377
You don't need extensive knowledge to write most software unless you're implementing a compiler or OS, like you said.
>>
>>52037430
Stop learning shit languages senpai.
>>
>>52037415
>you will be absolutely SHOCKED with how shitty the highly paid shitty programmers you work with will be. Even though I'm telling you, you probably won't believe me until you see it. But just brace yourself.

I've been slowly lately getting to understand this.

Seems like that's how it is in most fields too... It's jut people pretending to look smart in a suit and with degrees.
>>
>>52037415
Why the fuck does anyone need a degree to program if you're pretty much expected to shit out codemonkey-tier gluecode that makes use of other people's open source libraries?
>>
>>52037430
Probably because you don't know how to program and so can't jump in straight away with a "real" application.
>>
>>52037448
>internet brownie points
>seriously, it just makes them feel good and I guess they brag about it on their resumes

Well thank god for them then.
>>
>>52037377

Eventually you get to a point where you 'just know' a lot of things and you need to look them up less often (if at all).

This arcane experience is called 'learning'.
>>
>>52037478
I hope you're actually learning from them and not simply copy pasting their code verbatim.
They didn't get to where they are by simply copy pasting code.
>>
>>52037448
Yeah, there's a lot of sad cases on SO. I contribute to GDSE myself (top 4% this year or something), but never to questions that are asking for code solutions.
>>
Oh, and as a bonus tip: never stop reading. Whenever you're away from the computer and have some down time, crack open a programming book (or something related, computer graphics, etc).
>>
>>52037495
Some shit it feels easier to just copy-paste desu.

If I don't plan on a long term career as a developer and I just want to get something done and for it to work, isn't that a better idea?

For example Hooking Firefox to intercept PR_WRITE/READ... instead of trying to actually understand that fucking disaster seems better to just copy some nerdlord's code
>>
>>52037469
>Why the fuck does anyone need a degree to program
you don't. You need a degree to get a job. Well... not even that.. most companies expect a degree, but not all. Some good companies will look for nothing more than a good github account.

Having a good degree gets you past the HR department. Many companies will throw out CV's without a degree. If you can get a couple of years experience you can probably do pretty well without a degree too.
>>
>>52035738
Use Java friend. It's literally not much different than C#, at least in concept. Some of the words may be a little less centered around Windows, but for the most part it's about the same thing with a few less shortcuts already built in.

Here's a link to a HID library built by goodle:
https://code.google.com/p/javahidapi/wiki/ReadMe

I know what you're going through. C# was a pain in the ass for me because I couldn't get that stupid Visual Studio to download properly and when I did it said my OS was not compatible. I went the mono route and couldn't get it to work because I didn't have a way to manage the database link in time for my assignment.

Hopefully this helps a bit.
>>
Is E a good language? I don't want to spend weeks just learning its shit.

>>52034701
>ada
>dead
>or, seen from another perspective, ever alive
>>
>>52037525
C# is pretty enjoyable though.

Easy to use and it really is fun to work with over C++ or something.
>>
>>52037521
>If you can get a couple of years experience you can probably do pretty well without a degree too.
how are you supposed to get that experience without a degree?
>>
>>52037573
Contribute to open source software.
>>
>>52037525
>I just want to write a C# application
>Use Java friend.
Jesus christ, why.

>C# was a pain in the ass for me because I couldn't get that stupid Visual Studio to download properly and when I did it said my OS was not compatible.
>Blaming Visual Studio for shitty internet connection and my ancient OS.
just... stop
>>
Are there any gay porn sites with good RESTful APIs?
>>
>>52037586
>we want paid experience only

i've seen it before
>>
>>52037619
Work for a place (places) that don't require paid experience, then?
>>
>>52037573
>>52037619
LIE ON YOUR RESUME.

If you're not lying on your resume in 2015 i don't know what u doing senpai

Seriously just do it. You're not gonna get the job without it anyway so you might as well.
>>
Is this the hour where someone gives someone else advice on getting a job, but is mostly talking out of his ass and hasn't tried any of the shit he's saying?
Thread replies: 255
Thread images: 26

banner
banner
[Boards: 3 / a / aco / adv / an / asp / b / biz / c / cgl / ck / cm / co / d / diy / e / fa / fit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mu / n / news / o / out / p / po / pol / qa / r / r9k / s / s4s / sci / soc / sp / t / tg / toy / trash / trv / tv / u / v / vg / vp / vr / w / wg / wsg / wsr / x / y] [Home]

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.
If a post contains personal/copyrighted/illegal content you can contact me at [email protected] with that post and thread number and it will be removed as soon as possible.
DMCA Content Takedown via dmca.com
All images are hosted on imgur.com, send takedown notices to them.
This is a 4chan archive - all of the content originated from them. If you need IP information for a Poster - you need to contact them. This website shows only archived content.