|
just don't put any actual business logic in them if you ever want to scale
|
# ? Oct 13, 2014 17:53 |
|
|
# ? May 25, 2024 13:16 |
|
Luigi Thirty posted:don't do it sulk the results will be worse than the DNA that makes up your dog
|
# ? Oct 13, 2014 17:54 |
|
what is a good thing to do for a database, i know nothing and dont want to read very much
|
# ? Oct 13, 2014 18:23 |
|
generally you want to update to the latest version and perform regular backups
|
# ? Oct 13, 2014 18:30 |
|
make sure you install mysql and never update it
|
# ? Oct 13, 2014 18:32 |
|
BONGHITZ posted:what is a good thing to do for a database, i know nothing and dont want to read very much Microsoft SQLServer is the best one
|
# ? Oct 13, 2014 18:34 |
|
Shaggar posted:nononononononononono how much could a visual db creator gently caress up? It's not like a wysiwyg web editor making GBS threads out unmaintainable markup. ORMs are much worse just because sql is flexible enough that generated sql just turns into slow garbage
|
# ? Oct 13, 2014 19:16 |
|
MeruFM posted:how much could a visual db creator gently caress up? Microsoft
|
# ? Oct 13, 2014 19:29 |
|
assuming you're using the VS data tools and not EF's model designer, they work ok but are not as good as doing it in SSMS. The UI functionality is just not as good and you end up modifying a bunch of the definitions by hand. You can do it if you want but im not a fan. if you're using ef's model designer than just kill yourself More importantly db design in visual studio is generally done as part of an application solution which encourages you to think of the database project as ThisApplicationsDatabaseProject which is stupid for a couple of reasons. 1) nobody ever writes db schemas that are only used by a single application in a single solution. It just doesn't happen. poo poo always grows and more stuff gets added and pretty soon your db project wont match whats in the database and it will make it a pain in the dick to manage. 2) it encourages the idea of your application controlling the data model which is always terrible. That way lies orms, poor performance, and schema refactoring What would make a shitload of sense would be to have sql server manage a pseudo-solution that you could connect to from visual studio (with databases as projects) so you could work on the schema from visual studio and use things like source control to handle schema updates or the publish tool to move schema changes between environments. I actually talked to a dude who worked on VS and he had no idea that people don't always do one db per application. he could not understand the need for handling schema at a server level instead of an external, unsynchronized solution level. it made me really mad.
|
# ? Oct 13, 2014 19:30 |
|
FamDav posted:the frustrating part about c++ and c is that things can get needlessly tricky for no good reason. yeah I think you're right. For implementing NameServiceMock, look into free monads which are good for this sort of thing. check out http://www.reddit.com/r/haskell/comments/swffy/why_do_we_not_define_io_as_a_free_monad/ for more info - basically you make an ADT (called NameServiceF) with an option for each "IO" action you want to implement. and then something of type Free NameserviceF is a monad that collects the tree(?) of actions in a giant data structure which you then parse or interpret however you want So all your functions would be of the form code:
|
# ? Oct 13, 2014 21:28 |
|
AlsoD posted:yeah I think you're right. For implementing NameServiceMock, look into free monads which are good for this sort of thing. check out http://www.reddit.com/r/haskell/comments/swffy/why_do_we_not_define_io_as_a_free_monad/ for more info - basically you make an ADT (called NameServiceF) with an option for each "IO" action you want to implement. and then something of type Free NameserviceF is a monad that collects the tree(?) of actions in a giant data structure which you then parse or interpret however you want it makes enough sense for me to try this out. i was actually thinking about free monads because they would give me the structure without the decision of how to resolve. this will be a fun project that maybe a couple dozen people would enjoy and be ignored by the rest of my company. so a microcosm of haskell in real life.
|
# ? Oct 13, 2014 21:59 |
|
FamDav posted:haskell in real life. I don't think this exists
|
# ? Oct 13, 2014 22:03 |
|
yo how do i do this but in java C code:
how would the constructor of Observer look like?
|
# ? Oct 15, 2014 12:28 |
|
I ended up replacing myDouble with an instance of the Variable class below. myDouble itself will now always != null, but the value it contain (getValue()) may be nullJava code:
i am fine with this and my problem is solved btw Workaday Wizard fucked around with this message at 14:08 on Oct 15, 2014 |
# ? Oct 15, 2014 14:04 |
|
Shinku ABOOKEN posted:yo idk what this is supposed to do for you but change &myDouble to myDouble and print to System.out.println and it should work. the constructor would be setting an internal field of type Double or maybe Object to the value passed into the constructor and then isnull just does the null check. why you wouldn't just do myDouble==null or use double instead so its never null, I have no idea.
|
# ? Oct 15, 2014 14:13 |
|
like really what are you doing cause it doesn't make any sense and your variable class makes even less sense.
|
# ? Oct 15, 2014 14:15 |
|
i'm glad somebody else is thinking that too
|
# ? Oct 15, 2014 14:16 |
|
sorry for the incoherent post above what i wanted was basically C++ style reference variables. i want other objects to be able to see the current value stored in the variable at any time. the problem is solved btw (i used a wrapper object).
|
# ? Oct 15, 2014 15:06 |
|
There are reasons to want to use out or ref parameters, but Java doesn't have native support for them the way C# does. For that reason I'd recommend redesigning your code so that they aren't necessary. (Like, maybe return the new value instead?) At the very least, your Variable class should use generics: Java code:
|
# ? Oct 15, 2014 15:10 |
|
Shinku ABOOKEN posted:sorry for the incoherent post above I still don't understand.
|
# ? Oct 15, 2014 15:15 |
|
Shaggar posted:nononononononononono you can take the dev out of ruby on rails, but you can't take RoR out of the dev
|
# ? Oct 15, 2014 16:47 |
|
Shinku ABOOKEN posted:sorry for the incoherent post above you can make that externally visible variable "public" or use a getter
|
# ? Oct 15, 2014 22:29 |
|
MeruFM posted:you can make that externally visible variable "public" doin' it wrong, the post
|
# ? Oct 15, 2014 23:54 |
|
Shinku ABOOKEN posted:what i wanted was basically C++ style you'll be happier if you pretend you don't know c++
|
# ? Oct 15, 2014 23:56 |
|
Brain Candy posted:you'll be happier if you pretend you don't know anything
|
# ? Oct 16, 2014 00:49 |
|
Can confirm is true
|
# ? Oct 16, 2014 01:53 |
|
some of us dont need to pretend
|
# ? Oct 16, 2014 02:01 |
BONGHITZ posted:what is a good thing to do for a database, i know nothing and dont want to read very much Access
|
|
# ? Oct 16, 2014 02:05 |
|
filemaker
|
# ? Oct 16, 2014 02:05 |
|
or as i call it, smilemaker, because it's so easy to use it will make you smile
|
# ? Oct 16, 2014 02:06 |
|
Brain Candy posted:doin' it wrong, the post please tell why
|
# ? Oct 16, 2014 02:07 |
|
crimes against encapsulation, third degree greybeardism, and wish granting first, getters mean you've made some dumb data object. in this context why wouldn't you just make a dumb data object for the return type. not that those are great either second, public state is that nightmare where you crystalize your initial assumptions forever. getting it perfect the first time is p. loving hard third, its an x-y problem
|
# ? Oct 16, 2014 03:07 |
|
whats wrong with dumb data objects
|
# ? Oct 16, 2014 03:20 |
|
they're fine in c but if you start writing them all the time you make your java into c and none of your poo poo can be modularized or rewritten without hacking at all your ShitINeedToReturn3 blobs
|
# ? Oct 16, 2014 03:43 |
|
Brain Candy posted:you'll be happier if you pretend you don't know c++
|
# ? Oct 16, 2014 04:04 |
|
wish you'd solve your x-y problem and z your way out of this thread
|
# ? Oct 16, 2014 06:16 |
|
Luigi Thirty posted:wish you'd solve your x-y problem and z your way out of this thread
|
# ? Oct 16, 2014 06:34 |
|
I'm trying to figure out the best way construct a search based on a web search form that searches a number of descriptive fields in a relatively well normalized sql server product database (Each non numerical form field is tied to its own lookup) How do I construct the search queries to return relevance ranked results. Preferably with weights assignable to each field (by me not the person doing the searching) The search form would have options for things like price range, colour, style, features. As well as a keyword search which would search both simple fields and a plain text field.
|
# ? Oct 16, 2014 21:17 |
|
CISADMIN PRIVILEGE posted:I'm trying to figure out the best way construct a search based on a web search form that searches a number of descriptive fields in a relatively well normalized sql server product database (Each non numerical form field is tied to its own lookup) How do I construct the search queries to return relevance ranked results. Preferably with weights assignable to each field (by me not the person doing the searching) where color like '%' + search + '%' or style like '%' + search + '%' or features like '%' + search + '%'
|
# ? Oct 16, 2014 21:25 |
|
|
# ? May 25, 2024 13:16 |
|
It's seems that maybe the best solution would be to concatenate all non numerical data to a hidden text field then full text earch that then search the numerical data and then count the number of matches for the numerical information and order the results based on that. I don't know how that would perform on a national site that gets millions of visitors a day though.
|
# ? Oct 16, 2014 21:26 |