« first day (427 days earlier)      last day (3608 days later) » 

12:02 AM
@rolfl Can you explain what he means by "Can I make a for loop to create new touch event so I don't have to make an if statement for every new card in the discard pile (because we programmers are lazy)?" ?
That sounds a bit like advice about code not yet written
Overall I find your question very unclear, and part of it is because of a lack of context. In which method is this code? From where do you get your list of TouchEvents ? Please provide more context. — Simon André Forsberg 8 secs ago
 
No, that is exactly what his code is doing.... he's got a for loop with an if on each event condition.
He's asking if it can be improved.
 
> Can I make a for loop to create new touch event
I don't see any indication of him creating new touch events though
 
1
Q: Unhandled Exception handler that captures a screenshot

nhgrifSo, whether you're still in the development stages or your app is already on the app store, you always hope your app isn't crashing. But if it is, you want to be sure you've got good crash reports, right? Moreover, if your app is on the appstore, it may not be sufficient to wait around for Appl...

 
1
Q: Unhandled Exception handler that captures a screenshot

nhgrifSo, whether you're still in the development stages or your app is already on the app store, you always hope your app isn't crashing. But if it is, you want to be sure you've got good crash reports, right? Moreover, if your app is on the appstore, it may not be sufficient to wait around for Appl...

 
Anyways, TTGTB.
Night
 
 
1 hour later…
1:18 AM
0
Q: PBKDF2 Variables Security

CrizlyI've been using https://crackstation.net/hashing-security.htm#javasourcecode that PBKDF2 implementation for creating salted hashes and its working fine but it says I can adjust some of the variables such as: public static final int SALT_BYTE_SIZE = 24; public static final int HASH_BYTE_SIZE = 2...

 
1:29 AM
SELECT 'World' AS [Hello, ];
 
 
2 hours later…
3:03 AM
1
Q: Application Class Security

TravenIs my Application.php class secure for continuing development? The Application.php acts as a registry for the whole application. I tried not to rewrite already working code that is being pulled from Zend Framework and PhalconPHP, but allow myself to have freedom with using frameworks within my w...

 
3:35 AM
@SimonAndréForsberg oh man oh man
 
4:17 AM
0
Q: inserting tables with foreign key

user3263252How can I improve this method that add data to three tables in the database? The tables are UserTable, UserInfoTable and ContactTable. UserInfoTable and ContactTable have a one to many relationship with ContactTable having UserInfoID as foreign key. public static boolean addUser(User user) { Con...

 
 
1 hour later…
5:25 AM
0
Q: Getting status of web pages

MortezaLSCI have written a Python script that get status code of pages: #!/usr/bin/python import os import sys import socket import urllib2 from urllib2 import HTTPError if len(sys.argv) < 2: print 'usage: python %s <file-urls>' % (sys.argv[0]) sys.exit(2) while True: question = raw_...

 
 
2 hours later…
7:47 AM
0
Q: Refactoring of this complex PHP method

healI have one complex method with 1890 paths. I don't know, how can be this refactored. Can somebody add some tips about it? Maybe the mysql table structure is wrong. public function fetchClubChallengeState() { $c = $this->caller->in_club; $o = $this->opponent->in_club; if (!$c || !$o)...

 
8:29 AM
Why are the developer options in the Motorola Moto G hidden..
You have to click About Phone -> Build number 6 times
wups
wrong language for a sec
 
 
2 hours later…
10:26 AM
 
Monking
Almost 8K on SO! Without doing much lately
My mousepad is bubbling up :(
 
Monking
You've earned the "c#" tag badge. (bronze)
 
@SimonAndréForsberg You don't C#
 
Well, I do wear glasses...
 
Does anyone by chance have a racing wheel?
I don't C# well, but I can code Java pretty good.
 
10:31 AM
@skiwi But do you drink coffee?
 
I finally got my code to compile, had to edit my last question since I couldn't run it from work, had a few FOREIGN KEY constraints that didn't work quite right when I ran it from Workbench...
 
@SimonAndréForsberg Nope, I run without coffee here
 
Same here.
 
I don't know how you guys do it... Coffee to me is like fuel.
Of course Mountain Dew is higher octane.
 
I run on lemonade
2
 
10:37 AM
 
With on work and university days some "FruitShoot" energy thing for an extra boost
 
@skiwi kudos on taking the healthier route
 
I know I don't like coffee from since 5 or 10 years ago and ever from them I'm telling myself that I don't like it, without trying it again.
 
I didn't like it for a long time (I also didn't like beer for a long time) I guess I got used to it or something...
But... SELECT NOW() result '2014-07-05 06:41:06' and I'm having a cold APA beer :)
Thanks to, again,
 
What time is it over there?
 
10:43 AM
Almost 7am
 
That's a nice time to wake up
 
06:41:06
I hate it. On Saturdays I usually sleep until 10-11am
Probably stress though because of moving out
 
Did you wake up early, or like... middle of night, or just not go to bed at all?
 
@skiwi do you know SQL?
 
Ah, a regular move or some interesting move?
 
10:44 AM
Woke up middle of the night
 
@Phrancis Yea
 
Regular move, good move in fact, but the "moving" part $this->suck
Check this one out, posted yesterday:
5
Q: Revision 1 - Step 1: PsychoProductions management tool project

PhrancisI started a project to build my own invoicing and management system to take the place of prohibitively expensive QuickBooks software. This will be broken down in 5 steps, with the current step in bold font, and previous steps linked. Design the DB schema and table relationships, and insert dat...

@skiwi what time is it where you're at? Also, where lol. I'm Indiana, USA
 
@Phrancis 12:47, netherlands... I was quite late :)
@Phrancis Is it in BNF, or 3NF or however it's called?
 
@skiwi Huh??
 
@skiwi I run on milk and water!
And lemonade sometimes...
 
10:49 AM
Third normal form is the third step in normalizing a database design to reduce the duplication of data and ensure referential integrity by ensuring that # the entity is in second normal form and # all the attributes in a table are dependent on the primary key and only the primary key. Definition of third normal form The third normal form (3NF) is a normal form used in database normalization. 3NF was originally defined by E.F. Codd in 1971. Codd's definition states that a table is in 3NF if and only if both of the following conditions hold: * The relation R (table) is in second normal form...
@Phrancis It would be nice if you could add an ER diagram to it... Even phpMyAdmin can make one for you
 
@skiwi Er... I did not specifically shoot for either, though if I had to guess I would say 3NF... let me see if Workbench will let me do this
 
I'm not good enough to actually review it I'm afraid
 
0
Q: Android global data

DavlogI have a huge list of song objects in my program and I need those objects in almost all activities. Well, at least a part of it up to everything. So I created a class which looks pretty much like this : class DataStore { private static ArrayList<Song> songList; private static ArrayList<A...

0
Q: Do I need Generics in this case?

user3371223I want to implement KD tree. I have defibed class node as follows: public static class Node{ int id; public double x; public double y; public Node leftChild; public Node rightChild; Node(int id, double x, double y){ this.id = id; this.x = x; this....

 
@skiwi what's a good place to upload the ER image... ?
(so it can be linked)
imgur.com good methink?
That worked
 
Yeah, I suppose imgur these days
or simply SE network
you can upload directly from drive then
Yay, saw a question where a Java 8 answer is appropiate:
0
A: What is the right approach to concatenating null String in Java?

skiwiYou may use the following with Java 8: String s1 = "a"; String s2 = null; String s3 = "c"; String s4 = "d"; String concat = Stream.of(s1, s2, s3, s4) .filter(s -> s != null) .collect(Collectors.joining()); gives abc A few things to note: You can turn data structures (lists...

 
11:01 AM
The ER looks wrong, some tables are just "floating" out there
 
All those people are doing things so difficultly :)
@Phrancis Then they're not linked in the schema... which may be design flaw, or something went wrong when ERring it
I had a dream a few nights ago where I was forced to learn Ruby, or some people would do very bad things to me.
5
Quite strange dream it was.
 
@skiwi it was part former and now part latter. Workbench is acting funny. But yes, the tables were actually floating with no FK. Now Workbench is being stupid and not wanting to give me the ER, even though the code works fine
Also, that is a weird dream.
I think I had a weird dream as well, about learning Java. But I can't quite recall how it went...
Now time to start learning START TRANSACTION ... COMMIT;
 
11:27 AM
hehe
 
11:45 AM
Now that I think about it... I don't think I've seen a single post on CR for SQL that used TRANSACTION language... Guess someone has to start it :)
 
@Phrancis For those who are using Java and stuff, START TRANSACTION is done through Java code. For example I do em.getTransaction().begin();
 
You mean it can be done with Java code.
 
Is the concept similar, i.e., that it will either execute the whole transaction or none of it?
 
The same is true with VB.NET and C#. You can do your transactions with code like that.
And yes, Phrancis, the concept is identical.
 
yes, it is usually done through code.
 
11:58 AM
Yes, Simon.
Phrancis, under the covers, there's no difference between using code to begin a transaction versus using code to send a SQL command to begin a transaction.
 
@Phrancis Yes, I believe em.getTransaction().begin(); makes a SQL call to START TRANSACTION
 
@SimonAndréForsberg A procedure should use the transaction inside itself though I suppose, if that is the point of the procedure
 
@skiwi Well, yes, if it is a SQL procedure it makes sense to do it that way
 
The point of a procedure shouldn't be simply starting a transaction though.
 
True, I meant if the procedure is about some action that should be done within a transaction
 
12:03 PM
Absolutely. A procedure should do more than just that... preferably commit/rollback the transaction as well
 
When working with SQL transactions, it's quite important to make sure your code is guaranteed to go through a COMMIT or ROLLBACK after you've starting a transaction.
 
Although who am I to talk? I've never written a single SQL procedure in my life.
 
About half of my daily work is writing SQL code.
Although, despite having about as much experience in Objective-C and iOS development as I do in SQL development, I feel like I know much more about the former.
Or perhaps rather, there's much less that I don't know about the former.
 
@nhgrif I'm thoroughly interested in writing a transaction with ROLLBACK but I don't really understand how it works... any advice?
 
What do you not understand?
 
12:06 PM
I guess ROLLBACK conditions and how you go about coding them...
 
When you begin a transaction, anything you touch inside the transaction is locked to anyone outside--they can't even select from the tables that you're locking up.
ROLLBACK ends the transaction, undoing any changes made within the transaction.
COMMIT ends the transaction, committing any changes made within the transaction.
 
But how does the engine tell?
 
What engine?
 
Whether to COMMIT or ROLLBACK ... SQL engine (in my case MySQL)
 
You send the command.
I've got no experience with MySQL, for the record. Only SQL Server 2005/2008/2012
2008R or whatever it is
But a lot of things are the same.
 
12:09 PM
Syntax is pretty similar, I'm mostly interested in the logic
 
You send a BEGIN TRAN argument to start the transaction, then you write your logic to either go through COMMIT or ROLLBACK.
Are you trying to write all of the transaction logic purely in a stored procedure?
 
Yes
 
What are you trying to do? Can you give a plain English summary of the point of the SP?
There are two reasons (maybe more, but two that I can think of) to use a transaction.
And they're both kind of the same reason.
 
Insert data into multiple tables that are about a single record, e.g., a Person
 
Ah, okay, so it's important for data integrity that someone doesn't query these tables while data is in one but not the other.
In this case, SQL Server has a way to check if a server error has occurred
By querying @@Error I think
So you'd start the SP by beginning a transaction. After each insert, do whatever MySQL has available to see if an error happened during one of your inserts. If it did, ROLLBACK the transaction, and return out of the SP.
And ideally, your SP might take a varchar as an output argument so you can return an error reason
After the last SP, you once again check for error, this time in an if/else
and if no error, commit transaction and return out of the SP.
I guess really, it's all one reason to do a transaction.
If you're not running through multiple inserts that need to happen at the same time for data integrity purposes, you don't need a transaction most likely.
Well, either data integrity, or the possibility of some sort of error happening between the inserts.
 
12:20 PM
Here is what I got so far:
DELIMITER |
CREATE PROCEDURE sp_AddPersonCustomerSimple
-- p_ is for parameter
    (
    IN p_FirstName VARCHAR(40),
    IN p_LastName VARCHAR(40),
    IN p_Organization VARCHAR(100),
    IN p_Website VARCHAR(100),
    IN p_Address VARCHAR (100),
    IN p_Phone VARCHAR(20),
    IN p_Email varchar(50)
    )
BEGIN
    START TRANSACTION READ WRITE;
    BEGIN
    DECLARE v_NewPerson INT;
    INSERT INTO Person
        (
        FirstName,
        LastName,
        Organization,
        Website,
        )
 
What's "READ WRITE"?
 
Still need to add INSERT into other tables though
 
Does that mean in MySQL you could put the tables in Read-only mode during a transaction?
 
That means the transaction has READ WRITE permissions.
Yep
I thought SQL Server had something akin to that too
 
It might. I don't know that I'd ever use it.
In SQL Server, if you do BEGIN TRAN Something
You've created a named transaction called Something
 
12:23 PM
May be good in a select only statement, so it doesn't lock the tables to other transactions
 
I don't know that I'd need a transaction for a select statement.
Although... you can SELECT * FROM Table WITH(NOLOCK) and I believe that let's you read even if the table is in a transaction, I'm not entirely sure though
 
Monking @all
 
Monking monkey!!
 
@Malachi - top row for rep this quarter: codereview.stackexchange.com/…
Read locks on select statements happen all the time.
 
A big select?
Phrancis, you may want to look at this for your rollbacks: mysqltutorial.org/mysql-error-handling-in-stored-procedures
 
12:26 PM
@nhgrif - with(NOLOCK) means it does not lock the rows, so other transactions can update the data even if you are selecting it.
 
Okay.
 
SQL Server has transaction isolation levels. (most databases do).
depending on the isolation level, different things can happen, but, by default, if you have a transaction, and select data in the transaction, during the select, nothing else can update the data
you can add a 'select for update' indicator, which will mean that the read lock will stick around until the end of the transaction, with the expectation that it will be escalated to a write lock as well.
 
In SQL Server, as far as I've been able to tell, if you touch a table in a transaction, by default, nothing else can do anything with the data in that table.
 
isolation levels.
"READ COMMITTED" is the default
 
Ah, I see.
I still have a ton to learn with regards to SQL, but I do know I'm getting better.
 
12:30 PM
"REPEATABLE READ" means that the reads you do will keep their read-locks to the end of the transaction
 
99% of my work is on the mobile app companion to our desktop software. The other 3 programmers work exclusively on the desktop software. This week, while looking through code for the desktop software, I found a place to make an improvement to some SQL related code.
 
@rolfl I would really like to see what you think about this
Also, here is a complete procedure I just got done writing. (note it assumes default values on several columns, I plan to do a more detailed one later)
DELIMITER |
CREATE PROCEDURE sp_AddPersonCustomerSimple
-- p_ is for parameter
    (
    IN p_FirstName VARCHAR(40),
    IN p_LastName VARCHAR(40),
    IN p_Organization VARCHAR(100),
    IN p_Website VARCHAR(100),
    IN p_Address VARCHAR (100),
    IN p_City VARCHAR(40),
    IN State VARCHAR(2),
    IN ZipCode VARCHAR(5),
    IN p_Phone VARCHAR(20),
    IN p_Email varchar(50)
    )
BEGIN
    START TRANSACTION READ WRITE;
    BEGIN
    DECLARE v_NewPerson INT;
    INSERT INTO Person
        (
        FirstName,
 
@Phrancis I started looking through it..... got distracted by real life.
2
 
"Prohibitively expensive QuickBooks" is hilarious to me...
 
Real life tends to do that @rolfl
@nhgrif it's 15$ a month,
 
12:36 PM
Only because the company I work for sells ERP software mostly to companies who have outgrown Quickbooks. We charge a lot more than $15/mo.
 
Well maybe I can sell my own accounting software... oh wait... I posted the code already -_-
 
@Phrancis - if I may, I suggest you reorganize your SQL to put all the create-tables in one place, and all the INSERTS in to another. Posting the image from the workbench would be good too.
 
@rolfl I tried to post it but Workbench is not cooperating
But my logic is to put all the code related to one table all together for simplicity/clarity
Whole thing ran in < 5 sec
 
OK, the DEFAULT value may be affected if you don't have the data there, I guess.
 
I think creating all the tables first makes sense. Also, while time is a very important consideration in SQL scripts, when it's something like this where you're just running it once to create the database, time is less important.
You certainly shouldn't spend a whole lot of time optimizing a create or update script.
 
12:39 PM
Sure
Like I said I mostly did it that way for clarity
 
Right, but I'd almost argue that from a clarity perspective, it almost makes more sense to have all the tables created first so I've got the bigger picture of the entire database.
 
Since I'm creating a whole database in one script I figured it would be easier to insert values in outer tables right then and there, rather than at the end
Fair point. Feel welcome to write an answer :-)
 
I don't think I really can though.
I mean, there'd be so many things that I just wouldn't be able to comment on, because of my work.
 
Fair enough. I'm sure @200_success will jump on it when there is time lol.
 
alright, I have a few things to say ... ;-)
enough for an answer.
 
12:43 PM
The only things I'd really be able to comment on are things where I'd know the least because I'm not familiar with any MySQL specifics.
But as for database structure, table structure, column names, something a column might be missing etc., couldn't really comment.
 
Alright @rolfl looking forward to it. At this point I have not inserted any data in it so it's the best time to change anything
 
I did upvote though.
 
I appreciate that @nhgrif
This may be me being sadistic, but I actually tend to prefer MySQL syntax over SQL Server syntax. It seems generally more explicit. But @rolfl is going to disagree.
One time I should set DELIMITER LOL this should make the script more lively...
END LOL
 
Is // the way to make a comment in C#?
 
That or /* markdown here */
For multi line comment
 
12:53 PM
/// for XML documentation
 
So, // in C#, ' in VB.NET, and -- in SQL Server. Given that it's the same company managing all three languages, you'd think there'd be some consistency, especially considering how popular // is across other languages.
 
@nhgrif I think that ' is historical.
 
I'm beginning to approach my first silver tag badges on SO. I'm at 264/400 points for ObjC, and 259/400 for iOS.
 
I think Micro$oft just like to complicate things
 
I don't know whether or not I'll be able to get to 400 ObjC points before ObjC tag starts to die in favor of Swift. Don't know how fast the transition will be.
 
12:59 PM
Isn't the value of a Basic request just the string you have to pass in Base64 format?
 
' would throw an error in SQL... // might too since it is made of mathematical operators.
 
' wouldn't throw an error in SQL Server.
not necessarily.
It's how you start a string
 
It's also how to define a varchar, date, datetime etc. so I don't think it would work
 
Yeah.
I'm not recommending ' be used.
Though in SQL Server, /* comment */ works.
 
Yes. Seems /* foo */ is relatively universal
Though relatively universal in itself is a logical fallacy...
 
1:03 PM
Hmm, I'm up to 5 questions with 10 or more upvotes on SO. I've got one sitting at 8 votes, and two sitting at 7.
And out of these 8 questions, only 3 are Objective-C questions. Java is far more popular.
Well actually, 3 are ObjC, 3 are C, one is Java, one is C++
 
How do you CALL a SQL procedure in Java? Say I wanted to write to SQL: CALL MyProc(1, 'Hello');
 
If it's like C#, VB, or my iOS project for talking to SQL Server, then it's the same as executing any other select, insert, etc.
 
Link?
 
Well, how would you call the SP in MySQL?
 
CALL MyProc(1, 'Hello');
 
1:07 PM
Is it: CALL MyProc(1, 'Hello');?
Okay, then however it is you'd call: SELECT * FROM Table; in Java, you'd do the same thing
 
Alright
 
except instead of SELECT * FROM Table;, you write CALL MyProc(1,'Hello')
 
Lulz. @nhgrif... Microsoft? Consistent? Right...
 
It must look bad that it's 9am and I'm on my 2nd beer. Ugh.
 
1:10 PM
Hey @Jamal
 
hi
 
I feel I'm going to run before lunch time today.
@rolfl "City is 40 chars (Poor Tweebuffelsmeteenskootmorsdoodgeskietfontein)?"
^^ this made me laugh uncontrollably
 
@Phrancis It's not like people will care about a few bits of code :p
@Phrancis LOL It made me laugh even more because I understand.
 
How do you make a chat post that is a quote? Never could figure that one out...
 
> this?
 
1:22 PM
(where it is indented with that little dotted line of the left)
^^ yes
 
Like this?
 
> > like this
 
Note, I will also post it to DBA after CR has been done to see if they find anything that I could do better. — Phrancis 15 hours ago
 
> quote here
 
> or like this?
 
1:23 PM
AH that's perfect, thanks much
> Time-sequence data - your Product table contains the Product cost value. Are your products going to be the same cost forever? If the cost changes, it will screw up your invoice data.....
 
If you post a link to someone's comment on a question/answer or a link to someone's chat message it will show up as a quote like that
 
@rolfl any suggestions on implementing that?
 
@Mat'sMug You have a wall of 221 Simons to beat down.
2
 
Don't change your costs, Phrancis.
That's how.
 
> City is 40 chars (Poor Tweebuffelsmeteenskootmorsdoodgeskietfontein)?
@rolfl I should read that as "Twee buffels met een skoot morsdood geskiet fontein" right?, but the end seems rather awkward
 
1:26 PM
Haha... I just talked someone into changing their accepted answer to mine
That's fine, but just consider the other answer didn't really explain the problem/solution, moreover the other answer isn't actually completely correct and wouldn't work if you just copy & pasted it over. — nhgrif 5 mins ago
 
@nhgrif realistically I may change my prices in the future (hopefully upwards) do you think it would warrant just creating a new Product then? Any best practices on how to "label" them (for the lack of a better word)
 
@Phrancis I would definitely seperate them
I'd imagine a product table, having all product information ultimately
And a pricings table, listing at least the price of every product for all periods
(Well there's actually two ways around it)
 
I just thought, I could make a CreateDate column and ExpireDate column and build that logic into my invoicing procs
 
Or you store the price directly on every mention of the product number
Changing prices in the past and applying them retroactively is most likely not your goal.
 
And now we're back into the ground where I can't tell you how to solve this problem.
2
 
1:33 PM
I like @skiwi 's idea... normalize into a ProductPrice table, with EffectiveDate and ExpireDate columns, and work the logic in based on Invoice.InvoiceDate
 
@Phrancis This might be the most correct form... Until performance comes around.
I'm not so sure if you really want to fetch the price at every select, needing a join
 
WHERE inv.InvoiceDate >= price.EffectiveDate AND inv.InvoiceDate < price.ExpireDate
 
I think your database depends on the usage of the data in practice
 
Uhm
 
As a sidetrack... Is there some database (language) that allows this?
 
1:37 PM
Allows what?
 
More specifically: That allows writing the database as 'proper' (normalized) as possible, yet also giving the option to 'dynamically' trade in normalization for performance.
 
Phrancis, if you join like that, you will absolutely have to put a trigger on your price table to make certain that the effective/expire dates can't overlap for a given product.
 
@skiwi that's about right.
 
As far as performance is concerned, I plan to do most things as stored procedures so it should run pretty smooth
 
I feel my approach is better in theory, but worse in practice.
@rolfl Why is there a random fountain at the end of the sentence?!
 
1:38 PM
Tweebuffelsmeteenskootmorsdoodgeskietfontein is a farm in the North West province of South Africa, located about 200 km west of Pretoria and 20 km east of Lichtenburg whose 44-character name has entered South African folklore. The name was used as the title for an Afrikaans lyric written by and performed by Anton Goosen. The name, which follows a common format for place names in South Africa, is Afrikaans for "The spring where two buffaloes were cleanly killed with a single shot". The literal translation is "Twee buffels" = "Two buffaloes", "met een skoot" = "with one shot";...
2
Two buffalo mortally shot with one bullet near a spring.
 
That's my Native American name.
 
@skiwi define trade in ?
@nhgrif I haven't got into triggers yet, but I'll take that into consideration
 
@Phrancis Based on which queries will be executed on the database, that it would then select the proper database form which maximizes performance...
It might create a though
 
^^ that
 
1:42 PM
SET TRANSACTION LEVEL READ UNCOMMITTED is probably the best performing, but then it potentially could compromise normalization as far as your result set is concerned
 
how 2 ppl wanted to star @skiwi, but instead starred @Phrancis
2
 
But either way SELECT doesn't lock records unless you make it
 
I'm more concerned about the joining
Or do all RBDMS other than MySQL keep the joined table in memory if a lot of stored procedures ask for it?
 
Eh, joins are expensive any way you write them.
@skiwi I don't think any of them do, unless you explicitly tell it to
 
0
Q: Comparator based on Double values in Java

user3371223I have class point that represents point in 2D and I want to sort these points once based on their x-coordinate and second based on their y coordinate. Since x and y are double values my code looks like this: public static class Point{ int id; public double x; public double y; Po...

 
1:46 PM
In my experience, it's not always easy to predict what operations are actually going to be expensive. You just test it out. If it's too expensive, then you try to figure out how to make it less expensive.
3
 
I need
 
It's not even a workday.
 
Then.... suddenly octocores popped up in a discussion where I was asking onions about CPUs.
 
onions or opinions?
 
My onions are not very savvy about CPUs. But they sure do taste good.
@nhgrif sure but some operations, you can tell just by looking at them that they are going to be expensive... I once saw a script with a self JOIN and SELECT DISTINCT * that took over 30 mins to execute
 
1:53 PM
Other questions is also who defines expensive
If I have queries that take over 0.05s I say they take long already, but in that cases I want live performance.
 
Context is definitely important. Also,
 
There's also "How much faster can I make this?" versus "How much of a time investment is there in order to make this faster?"
If it takes a week of work to improve a 4 second query down to 3 seconds, is it worth it?
And added to that is, how much more complex is the new query? Does it's higher efficiency come at the cost of readability/maintainability? And again, is that worth it?
We have a stored procedure that runs overnight when no one is using the server. It used to take 6 hours to run, but the lead programmer has gotten it down to under 30 minutes.
 

« first day (427 days earlier)      last day (3608 days later) »