|
Shaggar posted:that's a common argument for bad languages and bad frameworks that's always a lie. knockout.js is better for large apps and for getting small apps out the door. likewise mvc/webapi are better and faster for both small and large apps than flavoroftheweek frameworks like node or ruby. christ, what an rear end in a top hat
|
# ? Jan 22, 2015 04:09 |
|
|
# ? May 11, 2024 16:04 |
|
hey I"m looking at this dependency inversion principle wiki and I am confused by these two things: --All member variables in a class must be interfaces or abstracts. --All concrete class packages must connect only through interface/abstract classes packages. can someone plz explain these? I understand what interfaces/abstract classes are but I"m confused. http://en.wikipedia.org/wiki/Dependency_inversion_principle
|
# ? Jan 23, 2015 00:36 |
|
Basically it means "program to interfaces" I'm not sure what that wikipedia stuff means either. http://objectmentor.com/resources/articles/dip.pdf
|
# ? Jan 23, 2015 00:49 |
|
i had a new program to write and i picked up perl, and on line 3 i said "naw too easy" and rm'd it and did it in ruby. it's an ok language, i guess. i dunno.
|
# ? Jan 23, 2015 01:07 |
|
i really doubt i will ever find anything rip if you use ruby for big projects
|
# ? Jan 23, 2015 01:17 |
|
ruby and python are rly good for tooling but tbh not great for much other stuff
|
# ? Jan 23, 2015 02:06 |
|
you should be programming to interfaces even if you are not using DI
|
# ? Jan 23, 2015 02:08 |
|
Notorious b.s.d. posted:you should be programming to interfaces even if you are not using DI "programming to interfaces" is a tautology
|
# ? Jan 23, 2015 03:12 |
|
b0lt posted:"programming to interfaces" is a tautology it is not. i am talking about java interfaces
|
# ? Jan 23, 2015 03:20 |
|
lol if your interface isn't COM1
|
# ? Jan 23, 2015 03:23 |
|
Single-implementation interfaces are dumb as poo poo. Yes, your class should have a sane public interface and you should stick with it instead of gratuitously adding methods all over the place. No, you don't really need a FooManager interface plus a FooManagerImpl class. If you find that later on you do need multiple distinct implementations, you can refactor things easily enough.
|
# ? Jan 23, 2015 03:35 |
|
FamDav posted:fy i trust no man or woman who uses the acronym SOLID unironically because every person i know who has also insists on way more inheritance than is ever necessary. my old company used to ask candidates if they knew what SOLID was during interviews. "think that's one of those anti-patterns i've been reading about"
|
# ? Jan 23, 2015 03:38 |
|
Jabor posted:Single-implementation interfaces are dumb as poo poo. Yes, your class should have a sane public interface and you should stick with it instead of gratuitously adding methods all over the place. No, you don't really need a FooManager interface plus a FooManagerImpl class. lol if you don't write interfaces as declarations of what you need while writing other code
|
# ? Jan 23, 2015 04:32 |
|
i started getting mysterious segfaults when i link my code against lib.a but they go away when i link against lib.dylib, am i gonna have to figure out how Xcode works to get in and debug this b/c: don't wanna
|
# ? Jan 23, 2015 05:30 |
|
three obvious possibilities you might have a static initialization ordering problem, this should be really obvious in the debugger you might be depending on something getting linked in (a category?) from an unused object in the .a your dylib is not actually the same code as your .a
|
# ? Jan 23, 2015 06:43 |
|
static archives are a neat technology but unfortunately they solve an almost completely different technical problem from dynamic libraries and so the semantics are really different
|
# ? Jan 23, 2015 06:45 |
|
Jabor posted:Single-implementation interfaces are dumb as poo poo. Yes, your class should have a sane public interface and you should stick with it instead of gratuitously adding methods all over the place. No, you don't really need a FooManager interface plus a FooManagerImpl class. I dislike the fact that instead of developing the tools to make unit testing easier and more capable, we instead cargo-cult these insane programming styles
|
# ? Jan 23, 2015 08:12 |
|
MALE SHOEGAZE posted:i really doubt i will ever find anything Please quantify big.
|
# ? Jan 23, 2015 16:05 |
|
fritz posted:i started getting mysterious segfaults when i link my code against lib.a but they go away when i link against lib.dylib, am i gonna have to figure out how Xcode works to get in and debug this b/c: don't wanna
|
# ? Jan 23, 2015 16:13 |
|
SYSV Fanfic posted:Please quantify big. Anything that isn't a single file.
|
# ? Jan 23, 2015 16:21 |
|
triple sulk posted:Anything that isn't a single file. As long as coding styles mandate classes and interface use, what is the problem? I just started hacking in python and I am not having any issues splitting things up into files.
|
# ? Jan 23, 2015 16:22 |
|
SYSV Fanfic posted:As long as coding styles mandate classes and interface use, what is the problem? You're using Ruby.
|
# ? Jan 23, 2015 16:25 |
|
Luigi Thirty posted:lol if your interface isn't COM1
|
# ? Jan 23, 2015 16:30 |
|
rjmccall posted:three obvious possibilities i think i can rule out #3 b/c I'm building the library as part of the process (i wrote the library and this code is a special case to interface it and a vendor's sdk)
|
# ? Jan 23, 2015 17:55 |
|
KOTEX GOD OF BLOOD posted:xcode fuckin owns and ill fight anyoen who disagrees why cant i figure out how to set include paths in it (i build from a cmake file, and had it make an Xcode project, but it didn't escape a space in a directory (vendor's fault, not mine) and i cant find where it's set)
|
# ? Jan 23, 2015 17:56 |
|
go to build settings put include in the search field??
|
# ? Jan 23, 2015 17:58 |
|
fritz posted:why cant i figure out how to set include paths in it i found "Search Paths -> User Header Search Paths" but I have to enter a path in there manually and four different times for debug/minsizerel/relwithdebinfo/release? !?!?!? and the linker's adding a "/Debug" to the end of a -L search path
|
# ? Jan 23, 2015 18:03 |
|
no you add it to the rightmost thing or whatever, that makes it default for debug/releasE/etc builds unless you override it in the leftmost build specific ones or whatever idgaf its friday sorry
|
# ? Jan 23, 2015 18:04 |
|
i don't have a thing on the right for that option, it's only letting me do things in the left boxes and changes don't seem to be propagating, I'm adding things in 'other linker flags' and it's not showing up in the command line in the build error window back to lldb and valgrind i guess
|
# ? Jan 23, 2015 18:21 |
|
~Coxy posted:I dislike the fact that instead of developing the tools to make unit testing easier and more capable, we instead cargo-cult these insane programming styles Haskell does this well by forcing IO to be explicit and since IO is the untestable poo poo in programs that requires some sort of mock or injection it makes refactoring code to be small functions that transform values (read: easily testable) much more obvious
|
# ? Jan 23, 2015 18:31 |
|
SYSV Fanfic posted:As long as coding styles mandate classes and interface use, what is the problem? I just started hacking in python and I am not having any issues splitting things up into files. ruby's idea of an interface is dynamically overriding classes at runtime an injecting them with whatever you need
|
# ? Jan 23, 2015 23:02 |
|
MALE SHOEGAZE posted:ruby's idea of an interface is dynamically overriding classes at runtime an injecting them with whatever you need youre saying that like its a bad thing Objective-C code:
|
# ? Jan 23, 2015 23:13 |
|
so i have basically inherited a very large and very bad part of our code base. the db schema is entirely denormalized and there's almost no validation and everything is a poo poo gently caress. also basically every table has a yaml or json column and then those columns are eval'd and attribute accessors dynamically defined. and of course really important data ends up in there so have fun doing joins with regular expressions. anyhow the whole thing is held together by a boatload of workers that just run and run and run because if something breaks, chances are it's going to work again in a few hours when some random attribute on the other side of the database has changed. anyhow, my question is, what's the best way to track state transformations in a web system like this? like, you know, I could intercept all database updates to the tables i'm worried about and stream them to bigquery or something but i have a feeling our dbas and network guys would not be very happy about that. is there maybe just a simple logging strategy i can employ because logging has sucked so far. using logging to track the (month long) lifecycle of an object in a load balanced and multithreaded application is extremely frustrating
|
# ? Jan 23, 2015 23:15 |
|
also i'm working on a project and i'm trying to use DIPlo and i'm making myself really confused
|
# ? Jan 23, 2015 23:17 |
|
Have a look at the new MySQL, MariaDB supported functionality, one of them has dynamic column support and I recall some DB supporting JSON column types.
|
# ? Jan 23, 2015 23:19 |
|
idk that sounds really messed up. the best idea i have is transaction logging but i guess youve tried that so i dunno e: lmao yeah use mysql
|
# ? Jan 23, 2015 23:21 |
|
~Coxy posted:I dislike the fact that instead of developing the tools to make unit testing easier and more capable, we instead cargo-cult these insane programming styles Not to say that objects are a bad idea, but making them the smallest unit of program composition is a Bad Idea.
|
# ? Jan 23, 2015 23:25 |
|
MrMoo posted:Have a look at the new MySQL, MariaDB supported functionality, one of them has dynamic column support and I recall some DB supporting JSON column types. nah i'm working towards getting all of those columns deprecated. Snapchat A Titty posted:idk that sounds really messed up. the best idea i have is transaction logging but i guess youve tried that so i dunno isn't there something i can do to fix this?? like a hadoop??
|
# ? Jan 23, 2015 23:29 |
|
MALE SHOEGAZE posted:isn't there something i can do to fix this?? like a hadoop?? i honestly dont know. in an ideal world i would transition to a normalized database, deprecating whatever was needed on the way. but idk what to do if youre locked on the schema and logging is out of the question
|
# ? Jan 23, 2015 23:34 |
|
|
# ? May 11, 2024 16:04 |
|
With the MySQL setup you can go crazy with foreign keys across the JSON datasets which would provide the protection. Other than that start removing query permissions and enforcing usage of stored procedures. Replace the denormalized tables with views and make use of virtual columns when needed. If non-MySQL you use a materialized view to accelerate the performance when required.
|
# ? Jan 23, 2015 23:39 |