|
Mr Dog posted:Dependency Injection is nice for webapps, how else are you going to instantiate your fifty-odd "controllers" I use aop to wrap methods in transactions and im pretty sure mybatis-spring uses it for mapping method names in interfaces to your sql in ur mapping files. so that stuff is cool and works well. altho I don't use spring for webzones, only web services (cxf).
|
# ? May 29, 2013 14:12 |
|
|
# ? Jun 11, 2024 12:45 |
|
aop is great unless you are trying to debug code or read code or understand what code is doing in really any way
|
# ? May 29, 2013 14:25 |
|
cf. database triggers
|
# ? May 29, 2013 14:26 |
|
So basically the same arguments made by plangers as to why dynamic typing is a good idea (because they need to use fewer keystrokes in Sublime Text or whatever to poo poo out their latest node.js disasterpiece. text entry being the most strenuous part of programming, you see) "oh i don't do software maintenance i'm a ~*code poet*~ at an awesome new startup full of likeminded ninja coders. we'll just throw away buttframework v0.4 beta and replace it with fartframework v0.4 beta without making any end-user-visible improvements whatsoever but it'll be more ~*omakase*~ or some poo poo"
|
# ? May 29, 2013 14:40 |
|
Shaggar posted:I use aop to wrap methods in transactions and im pretty sure mybatis-spring uses it for mapping method names in interfaces to your sql in ur mapping files. so that stuff is cool and works well. it probably uses proxies which are one of those java features that makes the language actually usable also gently caress spring guice 4 lyfe
|
# ? May 29, 2013 16:11 |
|
lol
|
# ? May 29, 2013 16:12 |
|
proxies own esp when you use them to write something that turns interface method calls into stored proc calls and return result sets as lists of java objects (i did this (it owns))
|
# ? May 29, 2013 16:30 |
|
that's what mybatis-spring does except it can do more complex object mappings too
|
# ? May 29, 2013 16:32 |
|
Mr Dog posted:So basically the same arguments made by plangers as to why dynamic typing is a good idea (because they need to use fewer keystrokes in Sublime Text or whatever to poo poo out their latest node.js disasterpiece. text entry being the most strenuous part of programming, you see) come back when you've got a real type system, with inference and row polymorphism.
|
# ? May 29, 2013 16:43 |
|
Enum<F extends Enum<F>> heh
|
# ? May 29, 2013 16:46 |
|
i used generics once. my boss told me they would make the api too hard so we just went with a runtime checked api. thanks java!
|
# ? May 29, 2013 16:48 |
|
tef posted:i used generics once. my boss told me they would make the api too hard so we just went with a runtime checked api. thanks java! this is a terrible question but what kind of engineering requires that level of genericity this shows my crappiness as a developer but i've never quite understood why there's so much genericness
|
# ? May 29, 2013 16:53 |
|
generics are ez.
|
# ? May 29, 2013 16:58 |
|
Naming conventions should be as follows: Files: All lower case with underscores if a space is needed. IE: butt_file Enum/Struct fields: All caps. IE: BUTTS, FARTS Objects: One word with a capital letter for each new word. IE: ButtObject Object fields: Same as objects. IE: ButtObject.Fart Comments at our place are as follows: /** * @brief Butt Function * @params None * @retval Farts /* Works out p-well for me!
|
# ? May 29, 2013 17:07 |
|
Stringent posted:i wish ppl would document the circumstances surrounding the code rather than the functionality. "This stopped working 4 months ago but they wanted to change something and eclipse file search grabbed this so I'm changing it. Gluck to next person"
|
# ? May 29, 2013 17:11 |
|
ratbert90 posted:Naming conventions should be as follows: ur fired
|
# ? May 29, 2013 17:21 |
|
Share Bear posted:this is a terrible question but what kind of engineering requires that level of genericity in languages with some level of generics (type erasure be dammed), it is useful for things where you don't know the exact type in advance. generics are used to allow enums in java for example. homework: try writing an abstract class in java where a method returns the type of the subclass. Shaggar posted:generics are ez. p e c s
|
# ? May 29, 2013 17:22 |
|
uG posted:ur fired Says you, my code is drat good looking. Also I adhear to C11 comments. /* */ no // for me!
|
# ? May 29, 2013 17:22 |
|
tef posted:in languages with some level of generics (type erasure be dammed), it is useful for things where you don't know the exact Just return the interface they both share and be done with it
|
# ? May 29, 2013 17:26 |
|
Hard NOP Life posted:Just return the interface they both share and be done with it which you totally know in advance, like with enums,
|
# ? May 29, 2013 17:30 |
|
this showed up on my facebook feed from a friendcode:
|
# ? May 29, 2013 17:41 |
|
ratbert90 posted:Says you, my code is drat good looking. Also I adhear to C11 comments. /* */ no // for me! if your code is so good looking why isnt it self documenting
|
# ? May 29, 2013 18:14 |
|
quiggy posted:this showed up on my facebook feed from a friend wow whoever wrote that is a total scrub u dont even need those parens code:
|
# ? May 29, 2013 18:23 |
|
uG posted:if your code is so good looking why isnt it self documenting Because my program knows it couldn't possibly create documentation as beautiful as mine.
|
# ? May 29, 2013 18:41 |
|
quiggy posted:
2spooky
|
# ? May 29, 2013 18:43 |
|
tef posted:in languages with some level of generics (type erasure be dammed), it is useful for things where you don't know the exact do you mean the return type of the method is the subclass's type, or the subclass's class object. types arent values in java
|
# ? May 29, 2013 20:55 |
|
Nomnom Cookie posted:the return type of the method is the subclass's type this one. and the method is defined in the abstract class.
|
# ? May 29, 2013 20:57 |
|
spoiler look at enum http://docs.oracle.com/javase/6/docs/api/java/lang/Enum.html ps i might be getting something wrong but i'm sure that's how I ended up doing it. i can't recall why I needed to do it though. i think i was just trying to get my head around java generics. tef fucked around with this message at 21:02 on May 29, 2013 |
# ? May 29, 2013 20:59 |
|
yea java generics suck poo poo but the precious loving snowflakes just love their dynamic typing, so Java is the only statically typed managed language that's actually reasonably supported these days. oop in general sucks poo poo but i can live with oop more easily than i can live with having code like def poo poo(butt): butt.do_something_i_guess_but_good_luck_figuring_out_where_this_rabbit_hole_leads() where you end up using such fantastically sophisticated source code analysis tools as grep. i mean it's that or use some lovely rear end functional language, and i'm lazy so i'll just re-use a zing i made over a year ago Mr Dog posted:Ah yes, functional programming.
|
# ? May 29, 2013 21:34 |
|
and yes most of the software that directly enhances my quality of life and that i enjoy working on is a "database skin", deal with it (sometimes the database is a file system tho)
|
# ? May 29, 2013 21:37 |
|
yeah nobody is allowed to do any functional programming until theyve passed a category theory exam
|
# ? May 29, 2013 21:51 |
|
this is what imperativers actually believe
gonadic io fucked around with this message at 21:54 on May 29, 2013 |
# ? May 29, 2013 21:52 |
|
nobody does anything useful with functional programming. functional languages for getting work done always include an imperative escape hatch
|
# ? May 29, 2013 23:08 |
|
Mr Dog posted:i'm lazy so i'll just re-use a zing i made over a year ago tbh you sound like a functional programmer
|
# ? May 29, 2013 23:08 |
|
type erasure is so bad but java generics are still the second best generics after c#
|
# ? May 29, 2013 23:10 |
|
JawnV6 posted:tbh you sound like a functional programmer are promises a functional thing? examples of using promises tend to involve cooking, especially the part where you fire up an appliance like an oven or coffee maker while you go do other things.
|
# ? May 29, 2013 23:24 |
|
crazysim posted:are promises a functional thing? examples of using promises tend to involve cooking, especially the part where you fire up an appliance like an oven or coffee maker while you go do other things. just look at the tcc heroin megathread to learn all you need to know about promises and cooking. "gonna fire up the stove to cook some heroin, makin myself a promise to never do it again and when the future is accessed we find im just not exceptional enough to move on with my life" this is c++ specific but im sure u could twist anything in there to fit other plangs
|
# ? May 29, 2013 23:39 |
|
std::future<regret>
|
# ? May 29, 2013 23:42 |
|
Jerry SanDisky posted:std::future<regret>
|
# ? May 29, 2013 23:43 |
|
|
# ? Jun 11, 2024 12:45 |
|
tef posted:Enum<F extends Enum<F>> heh this legit hurts my head I think I understand it after three reads, but it's still really a thing wait, no, maybe I don't understand it after all gently caress
|
# ? May 29, 2013 23:47 |