|
snype
|
# ? Jun 18, 2014 04:09 |
|
|
# ? May 16, 2024 18:04 |
|
suffix posted:i made this helpful visualization and you sunk my battleship 5
|
# ? Jun 18, 2014 04:15 |
|
suffix posted:i made this helpful visualization and you sunk my battleship what a post
|
# ? Jun 18, 2014 06:11 |
|
suffix posted:i made this helpful visualization and you sunk my battleship holy poo poo
|
# ? Jun 18, 2014 07:54 |
|
suffix posted:i made this helpful visualization and you sunk my battleship
|
# ? Jun 18, 2014 08:36 |
|
Share Bear posted:i make apps* for a living how are you hooking the element that you're injecting HTML into?
|
# ? Jun 18, 2014 14:45 |
|
what's good java style for a small self-contained program?code:
vs just making Butt's members be parameters to buttStuff which should be static instead or these are all poo poo and i should be doing something completely different?
|
# ? Jun 18, 2014 15:40 |
|
that's fine. it doesn't really matter if its just a toy program like that. you could do it as a static method for sure, but might as well make it a class in case you want to add internal state or something.
|
# ? Jun 18, 2014 16:37 |
|
cool, thanks. currently busy spending 20 lines reimplementing pairs including overriding equals and hashcode, thanks java. thava.
|
# ? Jun 18, 2014 16:51 |
|
how many times do you think this code (or a slightly better variation of it) has been written throughout history? at least I don't need to make mine polymorphic which makes things easier
|
# ? Jun 18, 2014 16:53 |
|
LARD LORD posted:how are you honking the element that you're injecting HTML into?
|
# ? Jun 18, 2014 17:15 |
|
AlsoD posted:what's good java style for a small self-contained program? just do whatever. if you do the wrong thing you'll regret it later and then you'll know not to do it
|
# ? Jun 18, 2014 17:23 |
|
USSMICHELLEBACHMAN posted:i did (started) the stanford one and he'd just have some data and you'd run your algorithm on that data and paste in the output
|
# ? Jun 18, 2014 18:28 |
|
Kevin Mitnick P.E. posted:just do whatever. if you do the wrong thing you'll regret it later and then you'll know not to do it learntocode.txt I think this is for real the only way to know how to code anything
|
# ? Jun 18, 2014 18:57 |
|
LARD LORD posted:how are you hooking the element that you're injecting HTML into? It's from some other js; i've dumped and diffed the objects after they were hooked when it works and doesnt work, and they are the same; is there a more subtle reason they wouldn't be? diff objects meaning: taking the watch expression on the object at the time of the breakpoint where it works, expanding it, copying it into a text editor, and doing the same for the second breakpoint where it fails, then running diff against the two files js dev!!!!! Share Bear fucked around with this message at 21:35 on Jun 18, 2014 |
# ? Jun 18, 2014 21:03 |
|
Careful Drums posted:learntocode.txt learntoanything.txt do something->gently caress it up->figure out why you hosed it up->do it better, its the fundamental loop of procedural learning
|
# ? Jun 18, 2014 22:00 |
|
my problems is i sometimes do something too infrequently that when it comes time to do it again, i think back and cant remember how i done it the first time
|
# ? Jun 18, 2014 22:08 |
|
Valeyard posted:ive had similar problems before and cant remember exactly why it wasnt being assigned properly, but here is a line ive used before which is failry similar and i know it works, if it helps I have no idea how to develop in javascript i can write the code alright but to debug i just open up the console and start typing until i manually create whatever state im trying to test. That and console.log every thing
|
# ? Jun 18, 2014 23:16 |
|
AlsoD posted:cool, thanks. currently busy spending 20 lines reimplementing pairs including overriding equals and hashcode, thanks java. thava. psst hey kid git a load a dis http://projectlombok.org/
|
# ? Jun 19, 2014 00:52 |
|
AlsoD posted:how many times do you think this code (or a slightly better variation of it) has been written throughout history? at least I don't need to make mine polymorphic which makes things easier the fact that you didn't spend that time looking for a less stupid thing to do means you correctly valued your time, hth
|
# ? Jun 19, 2014 01:09 |
|
yeah let me just install a new ide to use their library or wait maybe use the functionality from java.util.Map.Entry which is pretty much exactly what I'd want although the hash implementation is key.hash() ^ value.hash() so i'd still have to overwrite that why is Map.Entry specialised and hidden away when it's very general and could be in the standard library? java!
|
# ? Jun 19, 2014 01:14 |
|
AlsoD posted:yeah let me just install a new ide to use their library wtf are you talking about
|
# ? Jun 19, 2014 01:36 |
|
SavageMessiah posted:wtf are you talking about oh i misread it, works with netbeans and eclipse (only).
|
# ? Jun 19, 2014 01:37 |
|
since you are using an ide, use google to find the magic spell that implements hashcode+equals by value
|
# ? Jun 19, 2014 01:40 |
|
AlsoD posted:oh i misread it, works with netbeans and eclipse (only). oh look what's this http://plugins.jetbrains.com/plugin/6317 for the only ide that matters and for wierdo clowns that don't use an ide for java it works just with javac too
|
# ? Jun 19, 2014 01:43 |
|
in eclipse you can right click and then generate source and then equals/hashcode. it doesn't work w/ every class but most pojos it should be fine for. if u wanna be incredibly lazy i think commons-lang or something has a thing where you can just do like Java code:
|
# ? Jun 19, 2014 01:47 |
|
there was a thing in project lobmock that i didn't like but i dont remember what it was.
|
# ? Jun 19, 2014 01:49 |
|
I dunno I just like my having my tostring and getters and poo poo without my classes being cluttered up with generated garbage. I suppose code folding sorta solves that too though. At work we honestly don't use much of lombok aside from @Data but that's the important part IMHO, a lot of the rest is a little too magical. especially val jfc
|
# ? Jun 19, 2014 02:08 |
|
i agree tho if eclipse is gonna have its own common method generator you should be able to mark the class as needing it and have eclipse auto (re)generate it as needed and leave it folded by default.
|
# ? Jun 19, 2014 02:11 |
|
pair isn't in std lib because you're supposed to make pojos i assume heres what you do reference the class, quick-fix generate it. add ur fields public final. quick-fix generate a constructor that sets the fields bam pojo. private final w/getters is only a little more work so you can do that if ur a fag
|
# ? Jun 19, 2014 23:21 |
|
btw shaggar. you said jaxb is good. my experience has been that shaggar is right about java stuff so i tried it the problem is jaxb is poo poo. its so bad that i'm pretty sure when people say they hate xml they actually mean jaxb or related oxm poo poo
|
# ? Jun 19, 2014 23:24 |
|
hi tpsz/h. i am a terrible programmer. a thing i do a lot of is farting around with raw binary files with toy programs. currently i use c# for this, but are there any even easier options? lotta these higher level languages seem to really really dislike byte/bit janitoring. i want like c-strength bit-janitoring but with modern file i/o and com port i/o and yknow that sort of poo poo like i said c# is p dece at this so i dont care too much but is there anything better?
|
# ? Jun 20, 2014 17:10 |
|
Kevin Mitnick P.E. posted:btw shaggar. you said jaxb is good. my experience has been that shaggar is right about java stuff so i tried it what are you doing wrong? jaxb works fine
|
# ? Jun 20, 2014 17:11 |
|
Bloody posted:hi tpsz/h. i am a terrible programmer. Erlang/Elixir bit janitoring is very pleasant but very slow.
|
# ? Jun 20, 2014 17:46 |
|
Shaggar posted:what are you doing wrong? jaxb works fine i wrote a schema and generated classes from it. the classes are poo poo. also jaxb is a dick about namespaces. i want a serialization format thats pleasant for both humans and computers and jaxb is completely failing at the pleasant for humans part
|
# ? Jun 20, 2014 19:09 |
|
Kevin Mitnick P.E. posted:i wrote a schema and generated classes from it. the classes are poo poo. also jaxb is a dick about namespaces. i want a serialization format thats pleasant for both humans and computers and jaxb is completely failing at the pleasant for humans part
|
# ? Jun 20, 2014 19:17 |
|
Kevin Mitnick P.E. posted:i wrote a schema and generated classes from it. the classes are poo poo. also jaxb is a dick about namespaces. i want a serialization format thats pleasant for both humans and computers and jaxb is completely failing at the pleasant for humans part Try protobuf it works great for machines and humans. Basically you create .proto files which are the equivalent of an xsd and generates code, it has bindings for java, python and c by default. There are 3rd party binding for other languages as well if you need them. Here's the language guide for defining the .proto files https://developers.google.com/protocol-buffers/docs/proto I have it all mavenized using this config: http://pastebin.com/vP28qJLB The java bindings let you target two runtimes, so I optimize for SPEED on the server and for the LITE_RUNTIME on the android clients. With that config I can just drop .proto files in src/main/proto and maven will compile it just like the jaxb stuff. Each protobuf file has this header defined in the beginning code:
https://code.google.com/p/protobuf/downloads/list Janitor Prime fucked around with this message at 20:04 on Jun 20, 2014 |
# ? Jun 20, 2014 19:51 |
|
nah don't use google abandonware. just fix your schema or maybe do code first instead.
|
# ? Jun 20, 2014 20:01 |
|
It's way leaner than than SOAP on iOS and Android which is a big requirement for us. I've gone whole hog and made a Spring HttpMessageConverter that lets me receive protobuf objects from the clients using regular Controllers and Spring MVC. Also it might not be getting many updates, but it's stable as hell.
|
# ? Jun 20, 2014 20:10 |
|
|
# ? May 16, 2024 18:04 |
|
protobufs are good
|
# ? Jun 20, 2014 20:20 |