critiquemycode

Being Able to Debug a WinForms Application and Avoid the GUI from Freezing

UPDATE: I pasted the entire source for Mr. Kraft. Having said that, this is probably my first real WinForms app, so please dissect and critique as well if you feel like it. Also, to make the critiquing less painful for me, I should note that I wrote this app very quickly, so I have a task of refactoring and improving design for it assign...

Please critique my web deployment project file

After days of messing with it, i got my web deployment project to do what i want. It compiles the site, makes a copy, modified the web.config in the copy to point to a different database, zips up the copy and deletes the copy folder leaving only the zip file behind. It then does the same thing for production. But, i feel that my solution...

Critiquing my first Python script

A little bit of background: I'm building an inverted index for a search engine. I was originally using PHP, but because of the amount of times I needed to write to disk, I wanted to make a threaded indexer. There's a problem with that because PHP is not thread safe. I then tried Java, but I ended up with at least 20 try catch blocks bec...

Scala n00b: Critique my code

G'day everyone, I'm a Scala n00b (but am experienced with other languages) and am learning the language as I find time - very much enjoying it so far! Usually when learning a new language the first thing I do is implement Conway's Game of Life, since it's just complex enough to give a good sense of the language, but small enough in sco...

How can I improve this code

I'm writing a threading.Thread subclass that implements 'callable' methods. Normally with an arbitrary method on a thread, the method runs in whatever thread calls it. These methods run in the thread that they are called on and either block further execution in the calling thread or return a means to get the result depending on which de...

How can I improve my first user script?

I wrote my first Greasemonkey user script to find logo requests on the college-football subreddit. One wrinkle is having to search for the appropriate stylesheet, and then once found, I look through the selectorText attributes of documents.styleSheets[i].cssRules for known usernames. At first, I used the following code to search for us...

Can you critique my solution for the "ring benchmark" problem from J. Armstrong's book?

I am making my way through Joe Armstrong's book on programing Erlang. I came up with the following answer for the ring benchmark question. The code works but I am not sure if it is "Erlangic" (for lack of a better word). In particular I am not sure if I am using too many Guards. Can more experienced programmers critique the code? I had...