« first day (486 days earlier)      last day (3514 days later) » 
00:00 - 19:0019:00 - 00:00

12:01 AM
This remains one of my favorite reviews. @200 cracks me up. codereview.stackexchange.com/a/58254/41243
 
@Captain gimme an hour, I'll shred you to pieces
(if it's not closed, or edited to be fully on-topic by then)
 
12:18 AM
LOL
just saw someone's response to me and @rolfl deleting their answer....lol
 
@Mat the comments.... Omg... They hurt.
 
@RubberDuck all those MsgBoxs
 
12:40 AM
And magic numbers @mjolka
    ElseIf DelayOrTime = 2 Then
 
Part 3 is off topic. Changing what your program does is out of scope. I feel like part 2 is very borderline. We can certainly review this, but it's not clear that's what you want. — RubberDuck 1 hour ago
^^ obsolete, I edited the post from the close queue
 
0
Q: Merge Sort Implementation in Java (that seems slow...)

Manny MengI decided to write my own implementation of merge sort. Here is the code: public static int[] mergeSort(int[] array) { if (array.length <= 1) { return array; } int half = array.length / 2; return merge(mergeSort(Arrays.copyOfRange(array, 0, half)), mergeSort(A...

 
What comment??
 
@RubberDuck what are you talking about?
;)
 
1:03 AM
I don't know. I'm just a duck @Mat.
 
are you going to add more to that answer of yours?
 
1:37 AM
0
Q: Questions about dynamic memory in a C program that checks palindromes

ThomasA few things, just to get them out of the way. Yes, this is a homework assignment, but it's already done and it's not for a grade; it's meant as a refresher for the rest of the course. I've never done anything with dynamic memory in C before, so I'm assuming I've done at least something wrong. T...

 
Probably not @Mat.
I just couldn't let those comments go by.
If I do, it won't be until tomorrow.
 
@syb0rg Sorry, was sick, then away. What's up?
 
lurker.
Then returns to work late on the labor-day weekend.
 
@Pops Feeling better?
 
what do you call a guy with no arms and no legs in front of a door?
Mat
 
1:48 AM
@rolfl Yep, I do lurk, thanks for noticing. :P
 
that's random.
 
how do you invite a CR user to private chat?
 
@Malachi What do you call the same guy in the ocean?
 
Bob?
 
Right.
Now, what do you call that very same guy who swam the English Channel?
 
1:49 AM
what do you call the same guy hanging on a wall?
@rolfl what?
 
Clever Dick.
 
lol
 
Now, About the guy hanging on the wall?
 
@hichris123 Being sick on a weekday is extra no fun when it's a holiday. But yeah, better now, thanks.
 
@rolfl Art
 
1:51 AM
@rolfl Noted!
 
@Pops Ugh, that does sound horrible. If you were going to be sick on a weekday, you'd probably want to be sick on a day you were supposed to be working. :P
 
Actually, now that I think back to Friday, I think I should just leave it at "being sick always sucks."
 
I have this uncanny ability to get sick on weekends and holidays.
I sympathize/empathize when others have ruined weekends, etc.
 
What do you call an asian woman with one leg shorter than the other?
Irene
 
2:06 AM
@Malachi ...wooow.
 
was that bad.....
 
LO, JAMAL!
2
 
Sorry, my caps lock seems to always come on when you enter the room. :-P I'll get that fixed.
 
@Jamal That is the best super-power I will ever have.
 
2:20 AM
Yet another reason why I should work for SE someday...
 
2:32 AM
0
Q: Homebrew std::string for use with kernel

user52304I've ported some standard library facilities like vector, algorithm, etc. to my kernel so I can code in C++ instead of C. This is one of them. I'm looking for concerns regarding: Performance Safety Friendly interface Perhaps there are more idiomatic ways to accomplish what I'm going for? #if...

 
3:13 AM
@Corbin: Any advice for this regarding memory? I'm not so good with it in C.
 
Hrmm, yeah, I see a few common mistakes. I'll write an answer in a minute.
 
On the other hand, you don't have to address his request in the comment to my answer, as that would be new functionality (or so it appears).
 
3:31 AM
Ended up being pretty short: codereview.stackexchange.com/a/61739/7308
 
Cool! I also think that the while can be consolidated, but I can't determine how exactly. Would calling tolower() each time be better than dealing with two conditionals (in terms of efficiency)?
 
@Jamal Probably, but unless you're doing this on a hell of a lot of text, unlikely to be measurable
 
True. I just feel that that redundancy be eliminated somehow.
 
sure, I'd definitely go the route of just calling tolower on everything
 
3:49 AM
Oh, duh. I think I know how to reduce it now.
 
 
2 hours later…
5:45 AM
0
Q: ASP.NET MVC: Knowing who is the user in every request (in every action and every view)

sportsI will start by presenting the situation and then do the questions. First: I have many model classes that are mapped from/to tables using EF. Two of them are User and UserCookie, which are stored in tables Users and UserCookies public class User { public long UserId { get; set; } publ...

 
5:59 AM
@Mat'sMug Don't worry about it was just a sample. It's just a question that came to my mind and I decided to post it in meta before someone else does it.
 
@200_success are you reviewing codereview.stackexchange.com/questions/61692/… ?
 
6:16 AM
I don't know , and haven't attempted to review any F# questions before.
So, no.
 
cool, just saw you edit a tag and wondered
 
0
Q: .htaccess index.php removal, static content serving

CJ DennisI am writing a CMS type application and I am trying to restrict how the server gets accessed. Any content (in js/, css/ or images/ directories) should be served as is, as long as there is an index.php file at the same level as the content directory All other paths should run through index.php ...

 
6:32 AM
Monking
 
monking :)
 
6:49 AM
monking !
 
0
Q: Python or AWK golf, stuck in append bunker of a langre infile course

AWEHere is my first question on this site. It's about a childish script of mine. All I am doing is merging column 1 and 2 from one input file and see if these merged combinations exists in the other infile (and vice versa). I know I get stuck in appending. It did not get past that while running all...

 
Monking
 
 
1 hour later…
7:59 AM
0
Q: Possible memory issue in linked list program

DiptaragI am trying to write a program which will count the occurrence of words in a paragraph. The logic I am following : I am using a linked list for the purpose. And I am searching sequentially - if new word encountered adding the word in the list, but if word already exist in the list increase its ...

 
8:20 AM
hmm..
my unit-test seems cluttered...
	@Test
	public void test_init_callsLocationServiceAndMapsLocations() {
		// FIXME: LocationTestHelper!!

		Location location = new Location();
		location.setLocationName("foo");

		Mockito.doReturn(Arrays.asList(new Location[] { location }))
				.when(locationServiceMock).getAll();

		cut.init();

		Mockito.verify(locationServiceMock).getAll();
		Mockito.verifyNoMoreInteractions(serviceMock, resourcesMock,
				facesContextMock, locationServiceMock);

		@SuppressWarnings("unchecked")
		Map<String, Location> veriLocationMappings = (HashMap<String, Location>) Whitebox
 
@200_success why close this:
-1
Q: Python or AWK golf, stuck in append bunker of a langre infile course

AWEHere is my first question on this site. It's about a childish script of mine. All I am doing is merging column 1 and 2 from one input file and see if these merged combinations exists in the other infile (and vice versa). I know I get stuck in appending. It did not get past that while running all...

 
8:41 AM
I suppose you just wanted to put on hold to compel the OP to improve?
alright, looks resolved now
back to work...
 
9:14 AM
0
Q: a view returns system.data.entity.dynamicproxies

flavyi beginn in asp.net Mvc. I want to return view of question with the answer. this is the answer table and question table I make a third class to join class with a exam. Now i want to return a view with exams question and different answers. i have this error : System.Data.Entity.DynamicProxies....

 
9:27 AM
0
Q: Cast a raw map to a generic map using a method, cleanly and safely in a fail early manner

CandiedOrangeCasting, instanceof, and @SuppressWarnings("unchecked") are noisy. It would be nice to stuff them down into a method where they won't need to be looked at. CheckedCast.castToMapOf() is an attempt to do that. castToMapOf() is making some assumptions: (1) The map can't be trusted to be homogen...

 
10:09 AM
0
Q: Refactoring a multi-thread asynchronous application

TinworI'm trying to refactoring a multi-thread asynchronous application. I have a class the every time that the application launch particular event(they are generate from external devices) it launch a new thread and it register the event. After that in another class I launch a new thread that process t...

 
10:23 AM
0
Q: Possible cross site scripting vulnerability caused by url_with_protocol

Stefanos.IoannouI used pullreview to review my project. It came back with a security concern ( Possible cross site scripting vulnerability) on this line: link_to portfolio.website, url_with_protocol(portfolio.website), :target => '_blank' From what I understand, the url_with_protocol method that introduces th...

 
10:38 AM
Monk'n
 
M'king!
 
11:13 AM
0
Q: Keeping UI code DRY in iOS projects

benhowdle89I've subclassed UI button and used it in my View Controller's viewDidLoad method, like so: PLOTDefaultButton *createAccountBtn = [[PLOTDefaultButton alloc] init]; CGRect createAccountBtnFrame = createAccountBtn.frame; createAccountBtnFrame.origin.x = 20; createAccountBtnFrame.origin.y = self.vie...

 
noon @all :)
 
It's incredible how slow windowsazure.com is
 
Greetings, Programs.
 
@Donald.McLean Greetings, User
 
11:52 AM
0
Q: Service class that handles form validations

Kid DiamondI've made a (service) class to handle all form validation of my application. It contains a set of frequently used validation callables extracted into private methods that I use to build each is[FormName]Valid(); method. It would probably end up containing validation logic for about 5 or 6 forms o...

0
Q: how to simplyfy this if else

WiiMaxxQuestion How would you simplyfy/improve readability of this this if else, because even after my try to improve the readability i think it still looks messy my if else if (IsIN()) { result = true; itemresult = true; } else if (BEYOND) BEYONDDO.Add(item); else if (((relativeSartPoin...

 
12:06 PM
0
Q: Techniques to optimize the following stored proc?

xerxesI need to optimize the following store proc, please let me know of any techniques or modifications that I can make to optimize this piece of code. the procedure is for a report that needs to run and span a couple of months worth of data. ALTER PROCEDURE [dbo].[UP_Report_OverallSales_SP] @Dat...

2
Q: My first real JavaScript app

andrew_bI'm looking for some feedback on my first Javascript app. I've build an app that calculates tax for Australian tax payers. Would be great if someone could have a look over the code that I have produced. Specific feedback on areas that could be object orientated and any errors I have made would be...

 
Second monking
 
12:33 PM
> Notice that some of these examinations are from the older versions of the course. They are, however, indicative. The current course covers more material since 2008. You cannot bring these exam documents to the final exam!
Hmm, we need to use C apparently for Opearing Systems course, I think it helps that we need to run it inside Ubuntu?
Oh god...
> When you are already familiar with JAVA, the document C for Java Programmers might provide you a quick conversion course.
 
oh god why,..
 
I have a feeling I'll need to find some C IDE for this
 
> "The rebase for branch xy is not working..."
/me goes check the status: "rebasing 3/25"
/me be like wut??
/me `git rebase --abort`, then run update for `git pull blessed master`
"master is ahead of origin/master by 19 commits"
`git rebase` - rebasing 1/1
/me be sad
 
git push harder master
3
 
Monking gentlemen.
 
12:43 PM
Monking duck.
 
Did all the US peoples have a good holiday?
 
@Morwenn well if it had fixed the problem, sure, anytime..
eternal september has started anew..
 
1. Have magical motivation to do homework. 2. Figure out all resources are wrong. 3. Lose motivation.
3
 
@skiwi sounds like a good plan
 
It's not nobody ever bothers to proofread.
I've got a download link just pointing to the downloads page, great.
 
1:06 PM
@skiwi Awesomesauce.
I often wonder what webdevs are thinking half the time.
 
It's from our teacher though
 
lol
I'm sorry man. I feel your pain. My fiance's professors do crap like that all the time.
 
and then they dare to tell that the students do not have motivation
 
Professors are lazy.
I'm convinced that very few could survive without grad students doing half of their work for them.
 
1:31 PM
@CaptainObvious Frankly, I have no idea where to begin. Maybe Too Broad?
 
0
Q: How do i optimize my program?

user283779The problem is : http://opc.iarcs.org.in/index.php/problems/ENDCORR Here is the code that I wrote for it: #include<iostream> #include<vector> #include<algorithm> using namespace std; int main() { int val; int N, M, x=0, i=0; vector<int> visits; cin>>N>>M; for(x=0; x<N+M; x++) { ...

 
@CaptainObvious What happened to the blanks?!
 
1:44 PM
Doesn't expand?
user image
3
 
LOL. YES!
Ducks rule.
Hola @Phrancis!
 
0
Q: Simple class container for hdf5 files

magu_I implemented a simple class container for hdf5 files in matlab. The situation is as follows. Measurement data is safed in hdf5 format together with a lot of meta data. I want to provide an easy tool to load the table of data to browse trough the name and then only load the needed data with as l...

0
Q: How to convert multiple query to use parameters to avoid SQL injection

SearchForKnowledgeI have some dropdownlist in my aspx page and I am using the choices from them in my SQL query: query = ""; DataTable taskData = new DataTable(); connString = @""; //connection string strClause = ""; if (!blOnLoad) { if (ddlTaskName.SelectedIndex > 0) //dropdownlist { strClause +...

 
@CaptainObvious I'm not sure that should have been migrated...
 
Monking!
 
@RubberDuck It's not great, but it would not be closed as off-topic here.
it is perhaps a good example of a working-but-not-working question.
and, some politics involved there. I want to keep Haney happy ;-) So, go and answer it well....!
 
1:53 PM
Fair enough.
 
if (ddlTaskName.SelectedIndex > 0) //dropdownlist
{
    strClause += " AND CT.ATTR2739 LIKE '%" + ddlTaskName.SelectedItem.Text + "%'";
    //strClause += string.format();
}
 
â–² that..
should be an answer...
 
At least he knows it's wrong.
 
0
Q: I'm trying to turn a bat file into a C# exe file. Can someone look at my code and help me out

Davidusing System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Diagnostics; using Microsoft.Win32; namespace citrix_web_setup { class Program { static void Main(string[] args) { try ...

 
2:37 PM
Hey everyone!
Quick question for the eclipse users, is there a way to quickly change the type of a private variable and automatically update the getter setter ?
 
Downvotes on LOLCODE?!! how absurd!
 
@Marc-Andre f3 on the variable to go to the declaration.
No shortcut to update the getter/setter
But, when you find the getter/setter, alt-shift-c allows you to adjust the signature.
 
@rolfl Thanks a lot. You can rename the variable with the getter/setter at the same times, but looks like you still need to do some manual modifications.
 
3:18 PM
0
Q: Project Euler # 10 Python

DibaSHCan someone please tell me how I can improve this code?! Thank you. import math def main(): lim = 2000000 i = 2 now = [] total = 0 for i in range(2,lim+1): for x in range(1,int(math.sqrt(i))+1): if len(now) ==2: ...

 
3:41 PM
Wow, today is going to be a long day.
 
Is this much of an answer?
 
0
A: Is [lolcode] reviewable?

MalachiIf we look at the progression of the language that is used for texting and the fact that more and more internet browsing happens from mobile devices, who is to say that LOLCODE won't become the next Mobile App Development language? Eventually people will see this as a sub-language set of Engli...

 
1
A: Removing the largest values encountered so far in a list

t.pimentelOne thing you could use is Boost Container flat_set. The first answer to this question tells you a little about them. Another thing you could do, if you want to stick with std::vector, is insert values always in the correct position, so you will have the max_element always in last, or first posi...

 
> Today is September, 7672 1993, the september that never ends
2
@skiwi IMO it's not much of an answer. I would almost be tempted to label it as link-only answer
 
I can favorite a Deleted post!?
 
3:49 PM
@Malachi y u no try?? wut
 
4:03 PM
@Malachi I like your answer on the question!
 
@Malachi Did you know that you can also star your own message!? But only if you remove it first.
 
@SimonAndréForsberg lol I didn't know that
@Mat'sMug does this mean that it doesn't work?
> Also AFAICT there's no way of generating random numbers in LOLCODE (specs), so the LOLCAT always wins
 
1
Q: Concurrent Linked Hash Set

Abhishek BhatiaBasically I want to create a concurrent LinkedHashSet which returns proper size too. I am mainly concerned about adding and removing iterations.Also suggestions relating to implementation of set modification during iteration are welcomed too. import java.util.Collection; import java.util.Linked...

 
so sweet, but I don't think my Wife would get it.
is this you @Mat'sMug forum.lolcode.org/viewtopic.php?f=5&t=16 Dekatron?
 
# duck punch
class Integer
	def multiple_of? n
		return self % n == 0
	end
end
ah yes that's why I love ruby
 
4:16 PM
I need to learn Java......
2
 
Of course isrubyfastyet.com is a thing
 
0
A: TODATETIMEOFFSET inside a case statement

PhrancisIt looks like you have an error on this part of your query: THEN TODATETIMEOFFSET(AP.MinimumPrice, '-06:00') AP.MinimumPrice I would expect a decimal type, and SQL can't convert a decimal to datetime2. Also, to use a column alias on a case statement, you would put it at the very end just bef...

I need some SO love ;)
 
@Malachi you were still interested in the github chatbot?
 
4:31 PM
@skiwi I am at work right now, but yeah, I would love to get into some Chatbot stuff and work on a Java project, see what I can help with, and what I can learn....
 
3
a good one
 
Monking! ^^best video ever
 
@Malachi Ok, ping me later then, ar eyou any familiar with Tomcat?
 
and some times very real situation :)
monking @Mat'sMug
 
@malachi well it means I hit some limitations that forced me to simplify the thing
 
4:38 PM
AP.MinimumPrice would be something like '2013-02-01 02:00:00.000 -06:00'. TODATETIMEOFFSET(AP.StartTime, '-06:00') as StartTime, - This part works fine and it returns something like I stated above. Only thing I cannot figure out is why this doesn't work inside the case statement. thanks for the info. — paThixD 8 mins ago
^^ a column called MinimumPrice contains a datetime2 value? What the heck.
3
 
@skiwi Did you try to write : Are any of you familiar with Tomcat ? If so yeah I need a thing or two, but I don't know if it could be useful.
 
I am sorry. you are right. thank you :) — paThixD 3 mins ago
 
eeating time now :)
 
@Marc-Andre I'm confused now... you reply on @Malachi's ping? It's totally fine, but confusing :P
 
@skiwi Well I was wondering if you were asking Malachi if he knew something about Tomcat or asking us if someone knew Tomcat to ask a question :P
 
4:47 PM
Ah... no it was pointed to @Marc-Andre @Malachi in this case ;)
 
5:02 PM
0
Q: MySQL class to add user/database

setevoyI'm creating tool to add new virtualhost on UNIX-box. One of it's opportunity - add new user and database to MariaDB (aka MySQL) server. In fact - this my first 'real' attempt to use OOP. Here is class, which I created for it: class mysqlUserDb: warnings.filterwarnings('error') ...

 
@CaptainObvious lots of grammatical errors... Time to Jamalize it
200 beat me to it lol.
 
@chillworld That is me in every meeting ever...
> Of course I can. I can do anything. I'm an expert.
It's automagical.
 
0
A: SQL search column where one item in column is substring of another item

PhrancisI would do something like this: select * from tbltest where platform like '%item%' and platform not like '%item.%' -- searching for ASP and platform not like '%.item%' -- searching for NET Notice the additional dot before and after item.

Hmm this is fun for the adrenaline rush, try to beat SO regulars to quickest good answer!
Wonder if I can rep cap on SO today
 
5:23 PM
Is SE lagging for anyone else now?
 
Yep
SO just bogged down for me
 
@200_success Site is up
 
5:46 PM
0
Q: Wrote this program, Looking for feed back on my code

EasyEPlease review this code, I have just started to play around with C++ and I want to make my code efficient and clutter free. Please critic this code constructively and give feed back that will help me in my programming career thank you. #include <iostream> #include <iomanip> #include <limits>...

 
@Phrancis may I ask you something? I need your -mastery here...
How do each one of these fields contain the correct value, and yet the calculation result is off? Does 2+2=5 in MySQL?
	cast(ifnull(nullif(mine.f15,''),0) as decimal(10,2))
		+cast(ifnull(nullif(mine.f19,''),0) as decimal(10,2))
		+cast(ifnull(nullif(mine.f16,''),0) as decimal(10,2))
		+cast(ifnull(nullif(mine.f17,''),0) as decimal(10,2))
		-cast(ifnull(nullif(mine.f18,''),0) as decimal(10,2))
		-cast(ifnull(nullif(mine.f21,''),0) as decimal(10,2))
		-cast(ifnull(nullif(mine.f22,''),0) as decimal(10,2))
		-cast(ifnull(nullif(mine.f20,''),0) as decimal(10,2))
 
@CaptainObvious Too tired to review all of this...
 
looking for feed back, right
 
@Mat'sMug I want my feed back!
 
yep
clue @anyone ^^^ ?
 
5:49 PM
And does anyone have an idea for a better title here?
 
(about to bring it up on SO)
@Jamal I think I got one
(feel free to do better @anyone)
 
@Mat'sMug Could it be an issue with the cast to decimal? What's the underlying datatype?
 
varchar(7)
some are varchar(5)
and one is varchar(1) (go figure)
 
What's with the ifnull() undoing the nullif()?
Also, why are the f* columns strings?
It wouldn't surprise me if 2+2=5 in MySQL, though.
 
Well, if there's more than 2 decimal points, it will get truncated. That could throw off a calculation.
 
5:59 PM
because they come straight from a flat file
 
What do you mean, straight from a flat file?
 
there's an AS400 system working with flat files, an overnight process sends the files to a MySQL database, with fugly column names - I've created another database with meaningful column names, and bringing the data over there.
 
@Mat'sMug that's an odd operation, wouldn't you think there would be an easier way to do this?
 
In any case, I don't see the point of the nullif() calls.
 
'' != null right?
 
6:03 PM
Correct
 
so if I only do ifnull(blah, 0) I'll still have '' values to put up with, no?
or does '' correctly cast to 0? (I just don't trust MySQL on this)
 
You have both empty strings and NULLs to deal with?
 
yeah... don't ask ;)
 
And it came from a flat file?
 
I was told so
interestingly if I do the calculations off my own tables, I get the correct results
so it has to do with the casting
 
6:06 PM
@skiwi no
@Mat'sMug have you fixed it yet? and gotten it to work?
@chillworld This should be pinned permanently
 
cast( case( when null then 0 when '' then 0 else mine.f19 end case ) as decimal(10,2) )
 
@200_success actually... that's not true
 
@Malachi It shouldn't be that hard though, all you need to do currently is to be able to install Tomcat, and to build the project from Maven's pom.xml file with maven
 
@Mat'sMug would this work?
 
@Malachi You can get more info in chat.stackexchange.com/rooms/16134/tcg-creation
 
6:08 PM
I don't need the null-checks at all, was just me being paranoid (data source isn't very consistent)
I ended up doing this ifnull(nullif()) madness do suppress warnings at one point or another (can't remember which table exactly)
 
5
Q: Empty string inserting a zero not a null

gravyface(I'm using MySQL 5.1.) Insert looks like this: INSERT INTO foo (bar) VALUES (''); bar field was created as so: bar INT(11) COLLATION: (NULL) NULL: YES DEFAULT: (NULL) Shouldn't an empty string be inserting a NULL? Not sure why I'm seeing a zero (0) being stored i...

 
Thank you Santa for another Necromancer badge
> You've earned the "Necromancer" badge (Answered a question more than 60 days later with score of 5 or more) for "Custom Authentication Attribute".
 
Huh, I messed up; how do I create a local git branch based on the remote branch?
git checkout -b core-improvements-hotfix origin/core-improvements, seems to still base it off my local core-improvements
 
I have some webdesign stuff I need to be doing to hopefully get some web jobs @skiwi , so I won't be able to set up any environments on my home PC for a little while.
 
@Mat'sMug as messed up as your source data is, and that you're using MySQL, I don't blame you for being paranoid with checks and balances
 
6:13 PM
0
Q: What is a good design pattern for generating an Excel (xlsx) file in code?

user2023861I occasionally have projects where I have to output some data as an Excel file (xlsx format). The process is usually: User clicks some buttons in my application My code runs a DB query and processes the results somehow My code generates an *.xlsx file using either the Excel com interop librari...

 
@200_success OMGOSH
 
yeah, removed them, and now I have 64 warnings saying 1366 Incorrect decimal value: '' for column '' at row -1
ah, now I remember: I didn't want to do CASE WHEN foo = '' THEN 0 ELSE foo END for each column, so I thought I'd make '' be null and then make nulls be 0.
the warning isn't just a warning - it actually prevents the update from happening.
 
I've got an A vs B question for everybody. I need to do some validations in this really terrible language... I can either loop through every "Fixture" in the file each time, or just loop through the fixtures that fail. Like this.
For Fixtures
	If GetValue("Fixture","MerchZPlacement") <> 0 Then
		msgNum = 3120
		msgDesc = "MerchZPlacement isn't set to default"
		AddToMessageList(msgNum,msgDesc,"Error")
	End If

	If GetValue("Fixture","MerchZNumber") <> 0 Then
	   AddToMessageList(3130,"MerchZNumber isn't set to default","Error")
	End If

	' 4 more validations
End Fixtures
Or like this
For Fixtures {Where=GetValue("Fixture","MerchZPlacement") <> 0}
	'add to message list
End Fixtures

For Fixtures {Where=GetValue("Fixture","MerchZNumber") <> 0}
	'add to message list
End Fixtures

' 4 more validations
I can't decide which would be more efficient. I don't really want to loop through every fixture every time, but often, if there's an issue, it will be multiple issues with the same fixture.
So, if there are multiple issues, it will hit the same fixture once for each issue.
 
@RubberDuck which one would you rather maintain?
@200_success is this madness?
cast(case when mine.f15 = '' then 0 else mine.f15 end as decimal(10,2)) OnHand, ...
 
@Mat'sMug Neither really. I want off this insane language..... but I guess you're right.
...... hmmmmmm doesn't make sense to punish people who have their files right. If people screw up, they can suffer through the slow validation.
B it is.
 
6:26 PM
how about A, but still writing a validation function for each required validation?
(don't iterate 20 times to validate 20 things)
 
No functions.
 
oh
 
Yeah...
 
IMO it has to be A then
 
@Mat'sMug that looks reasonable
 
6:28 PM
@Phrancis the case when?
 
Yeah
 
ifnull(nullif(mine.f15, ''),0) seemed easier to read though
but WTF-prone
 
@chillworld always carry a red pen
 
I got my azure database running again. Only took me 2 hours to figure out my connection string was pointing to a localdb.
4
 
@JeroenVannevel Ouch
I managed to crash up our TCG by thinking it was a smart idea to exchange two method arguments... And forgetting to change it in the implementation side
 
6:39 PM
@Mat'sMug there is just something that feels dirty about converting a string to null and then converting null to 0... like one step that's not needed
 
and nothing wrong with CASE WHEN over 10 columns?
 
Other than being verbose and potentially ugly, I don't see one myself
 
..I still don't get the correct result. Annoying.
 
wtf
 
Some (most) rows do though.
Gonna do this step by step, from the source. I need to understand wtf MySQL is doing here
Side note: 4,000 views on the post (@sim :p)
 
6:48 PM
@Mat'sMug Well, at least I got "Good question" for my Brainfuck question today...
 
@Mat'sMug what does the non-empty data look like? I would suspect a type conversion issue to be more likely to fudge your results... MySQL is funny how it coarces type conversions between non-compatible data types
 
They look like legit numbers...
 
@Mat'sMug Mind if I ask what makes you say A?
 
Integers or decimals?
 
B will iterate once for each validation right? So A is more efficient.
IMO
@Phrancis decimals, like "14.65"
 
6:53 PM
No. It only iterates if a fixture fails.
A iterates everytime.
 
@Mat'sMug but stored as varchar strings?
 
@phr yeah
@rubber doesn't the where iterate 'em all, to see it any fails?
@sim congrats!
 
If it does, it's in compiled code and it's much faster.
 
I see it through LINQ-tainted eyes...
 
00:00 - 19:0019:00 - 00:00

« first day (486 days earlier)      last day (3514 days later) »