
Denaes
Avatar/Signature-
Posts
975 -
Joined
-
Last visited
Content Type
Profiles
Forums
Blogs
Events
Articles
Resources
Downloads
Gallery
Everything posted by Denaes
-
I do exactly this at various dynamic combo filters I have for grids. I just check to see if it's in the list, if so I don't add it.
-
The first line is a loop from the first element to the next to last element. The second line is a decrementing loop from the last element to the first. Because the second loop is counting down rather than up, you don't need to go all the way to the last item in the first loop. It's already been checked. Just one of many ways to skin this apple. Integer is a nice way of saying Int32. You could use Int32, but it would be overkill. Normally in .Net Integer is just fine because a lot of .Net apps aren't that performance intensive. This is a habbit you'll have if you make video games or many C++ apps, trying to squeeze your value into the best fit for the absolute best performance. It's a good practice, but IMO, not anything that I'm going to lose sleep over.
-
I had it running fine with 512 with the betas for quite a while. I upgraded to 2gb because I tend to also have firefox with 8 tabs open, an mp3 player, a pdf, etc, etc. So 512 seems fine. If things are slowing down more than you would like, more ram would be a cheap/easy solution.
-
How many companies are stingy with the user interfaces?
Denaes replied to Denaes's topic in Water Cooler
I'm jealous. :D My current company isn't really hip with the training. If we find books we need, we can buy them and we're reimbursed, but they become company books. We can take them home, but we generally need to share. 10 people can't all buy the same book :) Your place sounds like one of those video game places where everything is relaxed and the company really takes care of the developers. I agree with the periphials (that was the word I was looking for!) they're so cheap in comparison to medical conditions and sagging moral or as you say even rehiring someone new. -
By user interface I mean monitor, mouse, keyboard, etc. I used to work for a company which would get you something basic like a keyboard wrist pad, but not special keyboards unless you had like a doctors note. The monitors were all like 8 years old, huge and the screen was slightly fuzzy with internal smudges (looked like smudges on the screen, but they were in/under the glass) and a normal $6 mouse. The management had displays with like 3 plasma monitors and super keyboards and whatnot... only they didn't use their computers as much as the developers & support did. The company I work for now isn't awful, but there is a certain level of complacancy around the bare minimum. All the developers were working with 17" CRTs of okay quality (aside from taking up half the desk!) stock keyboards & mice. We got new computers... 2gb ram, dual CPU, super in every way... only we kept the same old monitors, the keyboards were new, but exactly the same setup/style and laser mice. I don't know, maybe I'm wrong, but from my development standpoint I'd think the top priority to getting the most/best work out of developers is to make sure they're comfortable and things are optimized. As a personal developer and computer user, I think the user interface is the most important. Why spend $500 on the cutting edge cpu and get a $10-20 lamo keyboard that fatigues your hands unnessicarily? Ironically, these elements (laptops aside) are the three pieces that if you actually had a quality set, you could carry forward from PC to PC as you upgrade. If developer comfort and productivity are such high concerns, why is a 21-24" monitor taboo, like it's only for movies? Like it's wasteful to have a screen where you can have all your VS toolbars open and still see the code without switching to fullscreen mode. Or you don't have to keep switching back and forth between documents? Why do people only consider the keyboards that are actually designed for ease of use (ergonomic wavy ones or the straight lined up keys) and user health to be unnessicary until after the user is in pain? I hate to say it, but maybe it's because I'm getting older, but I'm starting to consider my personal comfort higher and higher into things. Not getting extravigant, but bypassing the cheapo models for ones with features that will assist me and make my time more enjoyable. People look at my 17" laptop and think it's a luxury compared to a 14" laptop. Personally I would rather be able to see whats on the screen than have a smaller/lighter laptop. My next desktop I'm getting, I could care very little whats under the hood. Generically I have some ideas, but I don't care about the bits/bytes. I care about basic efficient CPU, lots/fast RAM, DVD/CD burner, decent video card, large fast hard drives. I'm putting far far more research into which mouse, keyboard & monitor I'm going to get, because these are the things that will really make my life heaven/hell. Or maybe I'm just a spoiled programmer who should be happy with what I get :D
-
Just to clarify, I'm not talking about using other peoples documentation, but using the MSDN Documentation. This is written & maintained by Microsoft, not someone else. Microsoft has the most up to date version of the MSDN Documentation online and fully searchable. It's the same stuff you have on your PC, only more up to date (unless you have a MSDN subscription and apply all the updates monthly) and you can take advantage of Googles superior search engine. I'm just noting that having access to both at work, I use the online version exclusvely. It also helps that I use Firefox and I can just start typing on a page and it starts searching for that text. So when it came time last night, I figured why spend the time/space installing when I'm not going to use it. I hope thats a bit more clear.
-
I normally do... but at work I realized that the interface is kinda lacking in the search capabilities I want and takes longer to load than a Google Query. Google gets me what I want faster... and without taking up so much hard drive space. Plus it's the updated MSDN without me having to install updates onto my computer. I say to myself "What if I don't have a connection to the internet... and happen to really need the MSDN? Not bloody likely I'm thinking. So I'm giving it a pass this time.
-
Okay, got it working flawlessly. MrPaul had me about 90% the way there and on the path, just some hitches I had to work through :D Imports System.Reflection ''' <summary> ''' BaseDataAdapter is inherits from ComponentModel.Component and will be set as BaseClass for all ''' Typed TableAdapters to allow a common code base so generic procedures can be created. ''' </summary> ''' <remarks> ''' Created by: Denaes ''' Created on: 07/19/2006 ''' </remarks> Public Class BaseDataAdapter Inherits System.ComponentModel.Component Implements ITableAdapter Public Sub InvokeUpdate(ByVal Table As DataTable) Implements ITableAdapter.InvokeUpdate Debug.Print("Invoke Update procedure for " & Table.TableName & " begun.") If Table IsNot Nothing Then ' Method to invoke. Dim UpdateMethod As MethodInfo ' Array of Methods parameter signiture types. Dim UpdateTypes As Type() = {Table.GetType} ' Not used, just a dummy value. Dim UpdateModifiers() As ParameterModifier = {New ParameterModifier} ' Array of Parameters to pass into the Method being Invoked. Dim arrUpdateParameters() As Object = {Table} Try ' Assigns the Method matching the given signature to UpdateMethod. UpdateMethod = Me.GetType.GetMethod("Update", UpdateTypes, UpdateModifiers) ' Invokes the UpdateMethod with the the Array of Parameters given. UpdateMethod.Invoke(Me, arrUpdateParameters) Catch ex As Exception ' This is a serious error and needs attention if something here fails. MessageBox.Show("Error with InvokeUpdate: " & vbNewLine & ex.ToString) End Try Else Debug.Print("Invoke Update for " & Table.TableName & " canceled. Table is nothing.") End If End Sub End Class Sorry, it stripped out all the whitespace. Well this shows how to create a TableAdapter Base Class that you can set for your Typed DataAdapters. This lets you pass a ITableAdapter Type into a generic procedure which can call the InvokeUpdate procedure which in turn will Invoke the Update method of the type of table you passed in. Reflection isn't the quickest thing, but so far it's the only way I've found to do this. It's not really impacting my performance since this application is doing updates one at a time... maybe batch deletes at times. Any other batch updates will be performed on the database side as management. I have my theories about how this might be sped up for a large batch of updates, primarily by moving UpdateMethod out of the procedure and only setting its value if it's nothing. That would remove most of the code from the equation on multiple calls.
-
I made an app that scanned the proccesses running and brought windows up and sent keystrokes. Instead of a mouse click at (54, 305) I would tab 4 times and hit "space". My app was primarily for backups on enterprise level software where the people were dumb enough to require you to stop using the database for a few minutes, and didn't include a way to configure options. It would just ask you with each backup. They used to have to pay someone to come in an hour early to do the backup prior to the days transactions starting because of that. Honestly if you want to use VB to learn it, do it. If you want to get the job done right and fast, go to http://www.autohotkey.com. You'll reduce a weeks worth of programming into about 10-20 minutes time. It's a keyboard mapping & scripting app written in C(++?) that basically wraps a whole bunch of windows functions and things for you to easily write a script or remap a key (my internet "homepage" key maximizes my VB code window now). You also have a wizard that will record your keystrokes, so you can go through the installation process with the keyboard & mouse (I advise against the mouse) and when it's over, you'll have a script for it that you can modify. Make that script run the setup file and wait for the forms to pop up and you're gold. It's not "silent", but it's automated. Export it to .exe and people can run that file instead to install the application. I'm not saying that it's better or does more than .Net, but it's Fast and easy to learn. It's by far the single most useful app to get windows things automated... especially being free. I've used it in data entry jobs, to create templates for code, remap keys, batch rename files in a directory, etc.
-
I've always wanted to dabble in the Dark Arts of Reflection. It looks extremely useful. I'll try to hack that to VB later on today and see how that flies :D
-
I program for Fun & Work. For fun, I've started a dozen apps and never finished one. I always choose something really complex and then get interested in something else.
-
Unless you have an aversion towards "working for the man" and making a career with your computer skill, go for the real book with money. Having a publisher publish a book means that someone actually thought your idea was good enough and your writing solid enough to stand behind. Publishing your own just means that you had some spare time, fingers and a word proccessor. Nothing more. I mean it could be a good book, but most are awful on so many levels (editing, layout, proofing, content). But if you manage the proverbial "Needle in the haystack" and get some good word of mouth and reviewers who will actually touch it, it might be worth a line on a resume.
-
Do you need to be running SQLServer to use a .MDF File?
Denaes replied to Denaes's topic in Water Cooler
Fair enough. And people wonder why .Net developers still use Access databases :p -
Dealing without a DataAdapter in 2005
Denaes replied to Denaes's topic in Database / XML / Reporting
Nope, didn't work. Any suggestions would be keen :D -
I know you can target a .MDF file with your connection settings rather than the actual SQL Server attached database. But if I wanted to use SQL Server to create a database (.MDF) and then attach it to a project, and I gave said project to someone without SQL Server, would my app still be able to access the database file? If not normally, does it require me to include any .DLL files? Or do you actually have to have SQL Server running on a PC to use the file? It's been driving me crazy, but I can't test it as all the PCs I use right now have SQL Server on them :p Thanks in advance for any info on this :D
-
Dealing without a DataAdapter in 2005
Denaes replied to Denaes's topic in Database / XML / Reporting
Wow do I feel dumb. The first think I do is go to create ITableAdapter and it already exists and is in use by Typed DataAdapters. So apparently my idea worked only I didn't have to create my own Interface :D -
So I have like 20 typed datasets (about 200 to follow over the next year), and want to create a single generic class to handle generic inserts/updates/deletes with error handling in a constant way... and I'd forgotton about this, but there aren't any table adapters in 2005. In 2005 each Typed Dataset has it's own custom DataAdaptor which only have a common type of Component. So that makes it awfully hard to generically do this. The best I can think of off the top of my head is to create an Interface for DataAdaptors.
-
You want to include if the code is yours to alter & resell or if it's exclusively their application. I'd ask for money up front, then at intervals as you meet goals. Make sure they know what they want. If they never ask for something until they get the final product and it's not there, they'll see that as a bug and the software won't be of any use to them. Now it wouldn't have been hard to add that feature in if they had asked, but now that you're done, this extra feature alters everything you've written. 150 hours down, 100 to go if you want to get paid. I'd say get a skeleton of what it'll be and have them approve it. They can point out things you're missing, ask you how they would do something and you might end up writing down other features you didn't know about. Also if you can impliment something 10 different ways with equal ease, it makes sense to do it the way the customers are most comfortable with. All this means communication the whole way through. Communication with the guy holding the checkbook and with people who will actually use the software. Also define what a "Bug" is and what a "simple addition" is. What seems simple to a customer can be an hour or a weeks worth of programming. What they see as a bug (it's not doing what they want) may just be the lack of a feature.
-
Yeah, the way I see it, you should do what you can to prevent an exception. Check for Null/Nothing's, make sure you're not dividing by zero, etc. But after the fact, if an error still slips by, bad performance or not, I'd rather have it Caught than to throw an Error. What I was most worried about was that even successful code within a Try would add overhead, which doesn't seem to be the case. Next step, mastering all of the Exception Types and how they relate to each other and interact with SQL Server Exceptions. :( Did I mention that Exceptions aren't the most interesting things to play around with?
-
When I was learning VB6 my teacher told me to be careful about when to use Try Statements because it ate up performance, especially Try's within Try's. Well I'm working on a huge .Net database application and I see tons of places that I'm using Try Statements. Pretty much whenever I'm attempting to add a record or fill a datatable... I guess I'm playing it safe. Our customers won't be using 4ghz PCs, but they're not going to be using 800mhz machines either. Probobly somewere in the middle. Is there still a performance stigma around Try statements? In a lot of books I'm reading they use them all the time without any notes about performance or costing extra memory or anything.
-
If it were up to me fully, most likely. I much prefer custom objects that I have 1000% control over. Every event, every wiggle, every add, etc. Instead my company went with the TypedDataSets because they're super fast to get set up, you have a good (if tricky and sometimes shadily documented) control over data and it hooks up fast/easy to databinding controls. Really in the most important matters they would both do what is nessicary, so I lost my objects :p Just saw the prices... At over a thousand US dollars, that exceeds my hobby program price limit :P Funny how the price is in Euros, but the number formatting isn't european?
-
Huh, I didn't get any popups or anything attempting to get me to download on their site. Funny. The concept looks rather interesting, but I think the sticking points would be price and/or performance. That would not work at all (as I read it described) for the project I'm working on now, which so far has about 50 tables and is only maybe 1/10th the project (estimated about 400+ tables when done) and so many are used with multiple other tables. But if it were as easy as it says and inexpensive I'd use that for some personal projects.