Nerseus
*Experts*-
Posts
2607 -
Joined
-
Last visited
Content Type
Profiles
Forums
Blogs
Events
Articles
Resources
Downloads
Gallery
Everything posted by Nerseus
-
My company has invested somewhat heavily, over time, in a framework. We modelled it closely to what the new MS book recommends, mostly through luck or skill or both. Our main architect in charge of keeping the framework updated has that book and loves it. mskeel brought up all the relevant questions that should be asked, or thought about, if you're taking time to build a framework. I would never suggest starting with a framework. Our framework has evolved from two main approaches, one good and one bad. The good is when we identify some cut-and-paste code and decide to make it more common and reusable, and put it in the framework. The bad is when we don't have the need for something to be reusable but we think we might and we try to think of how we might need it later... and we end up with code bloat. The agile guys name it YAGNI (you ain't gonna need it). Our framework comes with a price: maintenance. We have a small group of guys that maintain it in their time. And any changes must get cleared through them, to keep it clean. It's very well documented (unlike most of our other code). -ner
-
As for disappearing toolbars, I've only had success doing it this way: 1. Close all instances of VS except one. 2. Add your toolbar button or add-in. 3. Close VS (now nothing should be open) Now whatever change you made will "stick" with all new open instances of VS. -ner
-
I've no idea. I haven't seen any message to the effect that older messages get pruned or archived. A search shows 113 posts by you so maybe something did get trimmed? Years ago, when they split VB and .NET into two forums, I think they moved posts around. Maybe some got pruned from here, if they were more VB related? I know there are posts by "Nerseus" on the VB sister forums that I wrote, but my user account doesn't work there any more. A search probably won't find them all - I don't know how vb Forums supports those "removed" users or posts. -ner
-
Unlucky you, your word is 21 chars long and the max is currently set to 20! I sent a note to iNet since increasing the maximum length will make their database/index grow larger. I don't think they'll have a problem with increasing it, but who knows. For now, you can also use google to do most of your searches. Try this: ICustomTypeDescriptor site:xtremedotnettalk.com Unfortunately, it doesn't appear that anyone has posted on that word yet - or google is limiting it's database, too? Who knows :) -ner
-
There is no built-in way to query across tables or to join tables at all, with DataSets. Four options come to mind, none are "ideal", but ah well... 1. Use Linq or dlinq (part of C# 3.0) that lets you do exactly what you want - query across... well, just about anything. This is still in beta, so it may not be an option for you. 2. Add expression columns to one of the tables that point to the other tables - essentially make TableA have columns from TableB. Every column would have to be setup that way and expression columns tend to have quirks about their usage (some things, like HasChanges(), may not work correctly). 3. Manually add columns from TableB to TableA so that TableA has all of the values. This is totally manual. In the end, you could delete TableB as all of its data would be in TableA. 4. Try another option, like a JoinView. I played around with this a few years ago - I even ported it to C# without too much trouble. It may be what you want, but again, it's a custom solution - probably worth weighing against the more manual options, such as #3. -ner
-
Try this, if it works... 1. In VS go to "Tools->Import and Export Settings..." 2. Select "Reset all settings" 3. Choose to save your settings first or just overwrite them 4. Choose the best settings for you. I chose "Visual C# Development Settings" See if that helps. On some machines here at my work, people got the wrong settings and some menu items weren't showing up (Debug->Exceptions for example) and other VS behavior was different. If that doesn't work, here are a few other questions: 1. Do you have a menu for "Build->Configuration Manager"? Does it have a drop-down for Debug, Release, etc? 2. Can you get to Project Properties, the Build tab? If so, does it have a "Configuration" drop-down for Debug, Release, etc? You can also try this: 1. Right click on your toolbar, in a blank space and select "Customize...". 2. On the "Commands" tab, select Build on the left and "Solution Configurations" on the right. Drag "Solution Configurations" up to the toolbar. This should give you the Debug, Release dropdown. -ner
-
What PD said. Here's a sample: public class AdvancedAccount(string name, double balance) : base(name, balance) { // Nothing needed here - the call to base is done above } -ner
-
I don't know what VS was built with but I know it still uses COM for most of the internals, including most of the plugins (even VSS, I think). I worked with a guy (who is now at Microsoft) who talked to friends of his at MS to find out why the Add-ins were so hard to program. They told him that they developed code in .NET internally, but when it comes time to put something new into VS they have to get it working with COM. Or something like that. It sounded ridiculous, but that's what I heard. It would explain why, even in VS 2005, Add-ins have a COM-like feel to them. -ner
-
Filtering Dataview [Strange Problem]
Nerseus replied to anup_daware's topic in Database / XML / Reporting
Try square brackets: [vb DataViewAddress.RowFilter = "[Postal Address] LIKE '*Bel1*'" [/code] -ner -
I'm going to go with the theory that teleportation doesn't really destroy/create but rather opens a wormhole, of sorts, to move you from one place to another. In that case, it's like walking through a very hippy-free-like door. Of course, as a kid I thought that kind of technology would be awesome - teleport anywhere at any time. Now, it scares me a bit - if unchecked. You could easily see a very bad use of that technology, such as teleporting a bomb anywhere. Or a tiny pebble right inside of someone. I once read some sci-fi story where the teleportation technology only worked like an elevator. You had to enter a specific zone to get teleported to another specific zone. I believe the story had these zones setup on every street corner, so by taking a step into a zone you'd jump to the next block. Take another step and you'd be on another block. You could quickly get to where you were going just by walking. Sounded good enough for me :) -ner
-
First, congratulations to me - my company has been bought by 3M! As we moved from a small company to a large company (from 8 to about 80) we experienced a number of issues - which we've overcome (not without a lot of work and growing pains). Now we're expected to double in size in the next year (up to about 150 people). Besides the issues of just finding the right people, we're finding ourselves with new kinds of problems, such as keeping our codebase consistently high quality. The main question is (I hope): How do you share knowledge among many developers? Our company has a product that is sold from state to state (and soon to be international). Each area is overseen by one architect. Each implementation (each state) has a technical lead that knows that one area pretty well and can assign work and think of issues as new features are added. The goal is to get that knowledge that is currently only known to 1 or 2 people into the hands of many. For example, if I leave the project we need others to be able to come in and take over. Also, if I leave the project for a year and come back, how am I to remind myself of all the "gotchas" that are currently just in my head? I can think of 3 main options, but maybe there are more: 1. Paper documentation. This would involve writing "Tech specs" (as we've internally called them) that document the code at a medium level (down to class and method names, stored procedure names, etc.). These are organized around some subject area (generally some UI). They are meant to be kept up to date with code changes. 2. Test Driven Development (TDD). This would mean the code documents itself through unit tests. To understand how a system works, you look at the tests. I've never done this before, but seems like it may only be 1 piece of a puzzle. 3. Funnelling knowledge and review. This is what we have now - a few high level people know all about the system. They hand off work and then review the code to make sure there are no bugs (those that a non-informed dev wouldn't know about). -nerseus
-
I'm not sure what's possible, but if teleportation works by not destroying/creating, but by moving things around then there may be no argument. If it works by destroying/creating I guess it comes down to whether the destroying/creating is the SAME or not - whether it's a copy really. I like to think that there is a soul of some kind and so a simple destroy/create wouldn't be possible. Much like creating an EXACT clone of someone else wouldn't really be two of the same people. My bottom line, I think you'd be the same person - but, that assumes it's not really a destroy/create. -ner
-
I would think first about how you're going to use this code. Do you have a menu where a user picks the puzzle type/size they want? Is it loaded from a file? Is this just a prototype with results output to the console? I would think about the best way to create the class from how you'll use it and go from there. From a pure technical standpoint, having inherited classes that provide the defaults is fine. You may also consider using static methods, such as Doku.CreateSudoku(), that provides the defaults. -nerseus
-
Also, make sure you remove all but the code files (for example, only keep the CS, CSPROJ, SLN, etc. files). You can often get by with excluding a \bin\ folder (and maybe \obj\). Maybe the scanner is rejecting the EXE within the zip? -ner
-
One trick would be to NOT load a NEW image from the file for every cell. Rather, load up all of your images one time and reference them as needed. I would guess you have some set of "tile" images that are drawn for each cell - typically a simple 2 dimensional array. If you're only using the images to draw the appropriate picture in each cell, you don't need to keep loading images from disk - load once and use that same variable everywhere to draw. You can change your code pretty simply by doing the following. I added a wallImage which is only loaded once and then returned by the property. Your other code shouldn't have to change at all. I must admin, I'm not sure why you have a class level variable called "image" set to ImgWall - why not just use ImgWall instead of image, put the "if" logic into a function that returns the appropriate property? Or simply make the private variable a variable that's local to the method it's used in? private Bitmap image = null; private Bitmap wallImage = null; ... if (Type == Wall) image = ImgWall; .... public Image ImgWall { get { if (wallImage == null) wallImage =Image.FromFile("Images\\wall.bmp"); return wallImage; } } You may also consider using Resource files if you have VS 2005. You can put an image in the resource file and give it a name, like wall, then use it just like a class. -ner
-
After you change the code to use 0,0 I think you may get a NullReferenceException. You'll get that if DataGridViewCell is a reference type. The reason is that when you create a new array of a reference type, you have to instantiate each element in that array. For example: DataGridViewCell[,] cells = new DataGridViewCell[15, 1]; foreach (DataGridViewCell cell in selectedCells) { cells[0, 0] = new DataGridViewCell(); cells[0, 0].Value = cell.value; } Of course, it looks like you want the value out of a cell, which is probably of type object or string. In that case, it makes more sense to do this:' string[,] cells = new string[15, 1]; foreach (DataGridViewCell cell in selectedCells) { cells[0, 0] = cell.value.ToString(); // May STILL blow up if value is "null" } -ner
-
How many companies are stingy with the user interfaces?
Nerseus replied to Denaes's topic in Water Cooler
I hate to sound like a pompous braggert, but I picked my company for many reasons - the main one being that we all had a true *passion* for development. In that regard, we've spent the last 6+ years growing from 7 people to over 70 - not bad if you ask me. So for the question, we try and get all developers two monitors, almost all of which are now LCDs. I'm not sure the size, but they're almost all 1280x1024 - a few lucky ones have the big 20" 1600x1280 (?) monitors. Many devs get their own keyboards and mice. Some prefer wireless, some like natural, some like Logitech while some like Microsoft. We also allow anyone to pick out their own office chair - some like those strange kneeling chairs, some use the big rubber balls, some have standard office chairs. We like people LIKE coming into work :) The way I see it (and most of management, too), why not spend an extra $300-$500 per year on an employee that you want to keep? Get them a nice mouse, keyboard, computer, chair, monitors, etc. It's SO cheap compared to losing a good employee and hiring someone new! Since I'm already bragging, I'll mention the foosball room (yes, a whole room!), ping pong room, break room that we spend around $500 a week just to stock (thank you Costco!). We have an espresso machine that costs about $1000/year just to maintain! My boss has a taste for the good stuff. That's all for our local development office. The analysts have their own office and they get the same thing EXCEPT the espresso machine :). In fact, they somehow managed to swing a real Otis Spunkmeyer cookie oven in which they bake Otis Spunkmeyer cookies from fresh cookie dough (again, from Costco). I had to edit as I forgot about the actual development perks such as free books (I buy about 4 a year), training (within reason - we can't always get the good MS guys to come down), certification (the MS cert exams for example), etc. /end of brag -nerseus -
Forum Is ALWAYS messed Up!!!!!!!!!!!!!!!
Nerseus replied to kurf's topic in Suggestions, Bugs, and Comments
Well, if the window scrolls to the right because of a code window, there's not much we can do - nor would we want to, in my opinion. The code window is set to not wrap. If it did wrap, you wouldn't be able to read the code very well. For the most part people post normal code snippets. Sometimes, more often in the SQL forums, people post a long line of code and that forces a no-wrap. -ner -
Before I were to use a static method in your case, I'd wonder what you want to do? Your sample shows using 'RENDER' on a form - you could instantiate a variable one time in the form's constructor for example. Maybe this is a generic type of form to draw graphics - maybe you want a base form that has the Draw, Changes and Update methods. Your reasons are your own - if you just want some global functions (more or less), use a class with static methods. You could even put those methods in your form if you wanted, though I wonder what it is you're really trying to accomplish... -ner
-
I was a regular on the VB forums (same username although I somehow got removed not long after joining these forums). I did VB programming for about 6 or 7 years before switching to C#, hence the switch to these forums. I can't recall how I heard about these - I think there was an announcement on the VB forums and I just switched. -nerseus
-
Thanks for the update - the link is corrected. Should be helpful to anyone looking for good samples! -ner
-
As far as I can tell, you haven't given us enough info to help you. Your sample is: Col1 Col2 1/1/2005 "entry1" 1/1/2005 "entry2" 1/2/2005 "entry" What logic determines what's in Col2 for the date 1/1/2005? Do you want entry1 or entry2? Or, you don't care? -ner
-
Silly sql question and brain freezes
Nerseus replied to college_amy's topic in Database / XML / Reporting
I'm not sure how to do what you want in SQL - does it have to be in SQL? The .net framework provides a method to trim a string with the "..." automatically. You most often see it in a grid, or a tooltip for a long filename and path. I'd fear that any pure SQL solution is going to be pretty slow. If you're not too worried about performance, I'd guess you'd have to come up with some kind of formula. First pass guess is something like: SUBSTRING(@s, 1, <formula>) + '...' where the "<formula>" is your own choosing. Suppose the longest string you want is 30 characters. Find the first whitespace before 30 and use that for the substring length above. If there is no whitespace before 30, then set your substring length to 30. This is most easily implemented with a CASE statement, but that gets pretty slow pretty quick -ner -
Thanks for trying to divert away from the Diesel-centric post, but the issue on Joe Mamma is over. He broke the rules, on purpose, way too many times and showed no signs of changing - very simple decision really. More quotes from Diesel? I quite enjoyed the first batch... I didn't realize he was so helpful around here!
-
For asp.net there are numerous sites. Here's a few off the top of my head: http://asp.net http://www.4guysfromrolla.com/ http://weblogs.asp.net/scottgu/ http://www.theserverside.net/ (my friends use this, I've not used it much) Plus, as you mentioned, a couple of books would help. I'd look into at least two books: one on the language (C# in your case) and one on the technology you want to use (ASP.NET). If you want ADO.NET for data access, you may get enough out of the ASP.NET book. For C#, I'd recommend Programming C# by Jesse Liberty (there may be a newer edition by now). For ASP.NET I like Dino Esposito's books: Core Reference and Advanced Topics. -ner