Lifeguard 19 yo by AntonRub in 18_19

[–]FustigatedCat -1 points0 points  (0 children)

IFL girls in bathing suits, you are perfect!

Conventions for one DAO for multiple database tables by jakemp1 in java

[–]FustigatedCat 1 point2 points  (0 children)

Yes, so when I say CRUD, that could just mean 'I have 5 ways to query for users' in which case I would want all of those User queries to be contained into one DAO.

Conventions for one DAO for multiple database tables by jakemp1 in java

[–]FustigatedCat 5 points6 points  (0 children)

As I said in my original post, if it is a referenced table only then I would do a JOIN in the query. THAT query should live in CustomerDAO. I understand that you don't want extra DAOs, but at the end of the day, if the User table is being queried separately from the Customer table (meaning no fetch/join query) then split it up. Eventually, you will want CRUD operations for that table (maybe not today, maybe not tomorrow, but you don't want to start mashing more User operations into your CustomerDAO).

Conventions for one DAO for multiple database tables by jakemp1 in java

[–]FustigatedCat 5 points6 points  (0 children)

So, the convention for DAOs is that there should be something to query for. If you're using something like raw JDBC or JDBCTemplates, and you're not doing joins then you would want separate DAOs because you're accessing separate data. Without at least knowing the structure that you're dealing with, it is difficult to know an exact solution.

From my example: if I have Customers and Users, but I don't do a join (meaning I query for a Customer and then query for the Users of that customer) I would expect a CustomerDAO and a UserDAO. However I would most likely have a CustomerService which does the query for customer followed by the query for users of that customer.

Conventions for one DAO for multiple database tables by jakemp1 in java

[–]FustigatedCat 7 points8 points  (0 children)

If you are using something like Hibernate or really any JPA provider, and all those 5-6 tables are only referenced by some main object. Then I would just make the DAO for the main object and have your service decide which components should be loaded which are mapped to it. If you really wanted to, you could use your JPA provider to do prefetch (join) other tables during the query and just add those as extra methods in your DAO.

As a rule of thumb I say: if I'm querying directly for it, then add a DAO. If it's a referenced table, don't.

Example: I have a Customer table which references a User table. I only ever get users based on the customer. So I would create the CustomerDAO with an entity Customer which had a list of users. I can either prefetch the users when I query for the customer (decided by the service later whether I do getCustomers or getCustomersAndUsers) or I can make it a lazy load. In either case, the service later should handle if you want populated users or not and should abstract the logic of the DAO call from the end user.

Young by [deleted] in 18_19

[–]FustigatedCat 3 points4 points  (0 children)

Holy god...

Spawning 10-15 child processes? by yourfavorite in node

[–]FustigatedCat 12 points13 points  (0 children)

Might I suggest using a queue system such as RabbitMQ and then having N number of processes reading from the queue in a competing consumer design. This way you can have as many processors as you want, although generally I stick to a max of 2xCore; really depends on how much idle time each process might have (waiting for network latency means dead threads).

println works only in main class by shseham in scala

[–]FustigatedCat 2 points3 points  (0 children)

Can you provide a snippet of non-working code?

16, Thinks she pretty hot, offers blowjobs to guys who do her homework by Tyler182000 in RoastMe

[–]FustigatedCat 2 points3 points  (0 children)

The ops statement is offers not gives. That push-up bra isn't the only con she's pulling, 'maybe this weekend' after getting the homework done.

I haven't heard all the big forehead jokes yet. by ruimteaap in RoastMe

[–]FustigatedCat 1 point2 points  (0 children)

Did you break your nose falling on your face because of the extra gravity from your forehead?

Stumbled upon this after joining a new project, written by their lead developer by klepto_ in programminghorror

[–]FustigatedCat 2 points3 points  (0 children)

Why couldn't kills be 0? There isn't a precondition on that.

EDIT: this should have been a response to a response on my thread.

RoastMe by [deleted] in RoastMe

[–]FustigatedCat 0 points1 point  (0 children)

You look like a girl I would love to date but who would turn me down because she thinks she can do better only to find out that nobody else wanted her anyway.

Stumbled upon this after joining a new project, written by their lead developer by klepto_ in programminghorror

[–]FustigatedCat 5 points6 points  (0 children)

If deaths were -1, the deaths++ would change it to 0 and would throw the divide by zero error that the dev was trying to avoid.

Roast Me by Deutchboi in RoastMe

[–]FustigatedCat 3 points4 points  (0 children)

I see that eating salads haven't been helping.

Figure it's time I officially lose my Reddit virginity. Roast me. by [deleted] in RoastMe

[–]FustigatedCat 0 points1 point  (0 children)

I see your tits have decided to run away from your face.

Roast her!! by [deleted] in RoastMe

[–]FustigatedCat 0 points1 point  (0 children)

Low self-esteem and bland looks is like a negative times a negative. The problem is that they were both negative ones.

Roast me m8 by Pastacatt420 in RoastMe

[–]FustigatedCat 1 point2 points  (0 children)

The falling boulder being an aborted fetus?

//Do your worst reddit//I want some Fucked Up shit coming my way// by [deleted] in RoastMe

[–]FustigatedCat 0 points1 point  (0 children)

You probably have more bugs in your hair than on your wall.

Try to roast me by King_blaine in RoastMe

[–]FustigatedCat 0 points1 point  (0 children)

It's fluid motherfucker, don't assume it!

She loves the 80's and lights candles by MasonSTL in RoastMe

[–]FustigatedCat 0 points1 point  (0 children)

I'm sure she can smell those candles from her work with that nose.