Re: Update script for 329841 finished. Comments?

On Sat, 2006-03-04 at 14:36 +0100, Ruben Vermeersch wrote:
> On Thu, 2006-02-16 at 00:45 +1100, Bengt Thuree wrote:
> > Hi Gabriel,
> > 
> > Just finished my small patch for the Updater.cs to add a leading 0 to
> > the Month and Day directory.

> Does this cope with deleted pictures? Why not just do a "SELECT COUNT(*)

Hmm... now that you say it, I do not think I tested that particular
case. Need a separate try/catch for the first select statement then.
(Unless someone rewrites the logic a bit).

> FROM photos;", then return if needed. Afterwards, select all pictures
> and iterate. If memory usage is the problem, select all ids and then
> iterate.

The reason I was using a simple for loop, was that I could not figure
out how to work with a multiple return (like select (*) from Photos...)
As I stated, not good enough with C#... 

> Though it's not functional programming, why not use continue instead of
> huge if's (making most of the code drop 2 indents):

I am always having a problem with continue, but thats me personally. It
makes the code review more difficult (where do you go when you find the
continue statement) I think. But, you are right, I could use a few (if
something then continue) and after those do the work.

> Spelling-police: ;-)
> - throw new Exception (String.Format("Photo with name {0} do not
> exists", old_photo));
> + throw new Exception (String.Format("Photo with name {0} does not
> exist", old_photo));
Missed this one.

> Do like this patch, having the missing leading zero's is just plain
> annoying.

Thanks. Appreciate the feedback :) Not to mention, someone liked
it :) :)

Do you guys want me to update this patch, or will someone else?


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]