Jump to content
Xtreme .Net Talk

Denaes

Avatar/Signature
  • Posts

    975
  • Joined

  • Last visited

Everything posted by Denaes

  1. I did this workaround: Hour = Now.Hour.ToString Minutes = Now.Minutes.ToString I already have many functions for converting time back and forth in my program so this works just fine. I could clean up my code A LOT once I learn how to use the VB internal time functions... mostly I had problems with adding time together. Like so many projects, the time grows near (and abruptly without notice) and subtlety and finesse goes right out the window :D Thank you for your help :)
  2. Ok, I'm getting the current time like so: Time = Today.Now.ToShortTimeString At this time, the variable reads: "8:40 PM" I want to remove the space between "8:40" and "PM" I try these statements: Time = Today.Now.ToShortTimeString.Trim() Time = Trim(Today.Now.ToShortTimeString) Time = Today.Now.ToShortTimeString.Trim(" ") Time = Today.Now.ToShortTimeString Time = Time.Trim() I think I know why. When I set Time to be equal to the current time, it sets the reference to the time, rather than copying over the actual string (array of characters). This is annoying as heck. Any suggestions?
  3. A Good Reason to Sign a Contract I was asked to "convert" (play with it and make a new app that interfaces with the old database and has the same features) an old software app (that was written for the company by an old employee who is nolonger there) to VB.Net and stay on as a freelance programmer to alter it as needed as they resell it. The pay is 100% proportional to what it brings in and how much work I do on it. IE, if only a sales guy and I are involved and it makes 10,000 then I'd get $6,000. Bear in mind, this is my first real work after graduating college. Stupidly, I did not get a contract. I'm working on it, get about 3/4ths the way done and they start talking about improvements. A few companies are "demoing" the old program and want to pay money for a customized version of it (mine). The guys I work for start to discuss future plans. Fine, I can give input on that. Then they start telling me to impliment them on what I'm working on. Hold on here. I'm replicating the origional first. One thing at a time. Now it's the Origional w/ a few modifications. This puts me back about 50% done as I had to redo a lot of ADO.Net properties. I go to a meeting the other day and they look over my 90% done program. "Great. This company we sold it to wants these changes and have been herassing us for them for about 6 months" ***!? Why would you sell something you don't have and promise them something you havn't asked the programmer to do yet!? So I start talking with the owner who starts asking how long each individual 'enhancement' will take, which I absolutely hate. Sometimes I don't know. If I run into something I don't know how to do, I need to research it (like ADO.Net, I could rewrite this program in like 1/10th the time now that I know it). This is how it goes: "I want this to do something different, to focus on the middlemen instead of the end customers." "Well it's written for customers, thats what the origional program does" "How long to change it?" "About an evenings work" (take into consideration that this isn't my day job and an evening can be anywere from 3-8 hours) "Ok, I'll consider it done then. Next..." I think to myself "Whatever, I'll do it". Then He's totals everything up. I need it done by friday. Of course he tallied my "Evenings" as nothing. Since it was tuesday night that was out. I have Wed night, thursday and friday night to get it done, or the customers are walking. You think this might have been mentioned a week or two ago? So I could plan my schedule to get it done? It's like having a crappy old car. You're screwed. You have to pay 300 to fix it. You've spent 2,000 on it already, which is all a loss if you don't fix it. So you fix it, but something else comes up. In this case it's time. I've invested A LOT of time on this project. If I just endure a little more I'll hit my payoff. Of course the one smart thing I've done is to sidestep any discussion of me giving them the sourcecode. Theres no contract so as far as I'm concerned, it's mine. They're going to be as dependant on me in the future as I am of them at this moment. They've invested a lot of money to get a working program they can have altered. No source code = No Altering. This is my one bargaining chip with them. Some of the guys are Old Skool programmers, back when the black and green screen was new technologies. I don't think they know enough about .net to decompile it. Heck, I might even compile the whole program if it will prevent them from getting at the code. I don't care if it takes a performance hit. I've been getting random paychecks at random intervals, which confuses me because I'm supposed to be on a % of the profits. I fear them getting my program and just "reselling" it to multiple people without cutting me in on it... which is another reason why I'm very reluctant to give up the source code. And these are good reasons to NEVER take a job (web design, programming, graphics design, layout, etc) without a contract up front. Ask yourself "In what possible way can this go bad/sour?" instead of saying "That will never happen", take my advice and believe that it will. It may not, but act as if it will. Look out for yourself or you'll end up getting suckered into doing more work just to break even or get what you agreed on for the lesser work.
  4. Duely noted. I looked for books yesterday, but I couldn't tell which ones were the ones that I needed... most seemed too advanced. This is why I'm trying to learn this. I honestly think if you plan out a program properly, you can just jump in and code each module (procedure/class) one at a time and check them off. You already have it planned out how much work you need to do. Sure you're not going to get it 100% right in design (especially by yourself without feedback from others), but getting the majority is a damn good idea.
  5. Havn't heard of 'USe Cases' before, but I did see UML when I was searching... Wasn't entirely sure what it was. I'll check those out, thanks :)
  6. Good Step #1 I have all of the features worked out, in name/concept. I know the output of what the program will do. I need to design the actual program on paper (or as much as possible). Honestly all I can think of is a massive Outline, starting with the program, I'd guess breaking it up into each feature/action then what procedures go into each of those... which doesn't seem very practical. Eventually it's supposed to be broken down in a way that you know the names of all of your procedures, what variables you're using, which you're passing, which classes you're using, whats on each form, etc. It's supposed to be written in psuedocode so that anyone, regardless of programming language (so long as it has the same basic features, can't set up an OOP design and code in Basic) can read it and apply to their language. It's supposed to decrease you fumbling and make your code cleaner. I suppose it would be ideal to have others look it over and give their opinions on it.
  7. I have a problem. I don't really plan out my software before I write it. I want to be able to plan out a program on paper (or using an organizational program) before I start programming, but honestly I don't know how. I did try with the last project I had to do, but... I started, then there were tangents and I had ideas all over the place. I didn't work out but 1/100th of what I had to do. I'm not looking for someone to teach me how, though any pointers would be greatly appreciated. The help I'm looking for is referrals to what I need to get me started. Even a technical name for what I want would help me search for it. I've tried searching for Software Design, Software Planning and Software Management, but I don't really get any useful hits. They're all much too broad (or not exactly what I'm looking for). I'll buy a book if it will help, but I don't know who makes a good book or what book is good to get started with. I looked on Amazon and got hits for things like Design Paterns, which seem like the next step to help you organize after you get the basics down. I feel like I'm at my witts end and frustrated that I can't seem to find anything or figure out where to start. Any help/advice at all would be greatly appreciated.
  8. I'm not cocky about that. I was one of the top three in my class, but I know nothing about programming (theory and code) compared to the majority of regulars on this board :D I mentioned it, not because I'm cocky, but because I had an advantage over my classmates which is turning into a disadvantage. I never got in the good habits because I just never needed to. The tasks and projects were never large enough to warent that kind of planning. I think there was one project were I spent like an hour because it was all about recursive functions and loops within loops, which hurt my head for a while until I got the hang of it. Even still, I mostly got through that project by doing it over and over and seeing what results I got. I think thats okay to do with a single function/routine if you need to test something, but its crazy to do that sort of testing involving dozens to hundreds of lines of code. Same here. Divil is the man! So are most of the other users. Most people have a niche where they're the masters or at least very good and then reasonably well rounded in other areas. I'm good in some areas, but I don't excel in any of them, by comparison of the real masters on this board. Dude, my application would be like a mini version of 1 of the 30 projects in your grand solution and it still makes me feel that way. I can chalk up a lot to my time consumption to having to learn new aspects as I go (like learning ADO.Net), but really, I didn't plan and I would probobly be done if I had. Yes, I know. I'm writing functions, then adding more. I have a lot in a public module (I know, thats bad practice) to be accessable throughout multiple forms, then I keep adding more, then altering some a bit, then adding overloads of the same thing, then getting further and removing an aspect, etc. I'm not saying in any way that planning is bad. I'm saying that I fell into what I would think is a common pitfall for young programmers. You see the programming, it looks easy. You do it, easy. Then you try a really hard program and its like climbing a mountain because you didn't plan. If anyone has any knows of any advice, links or books that could help me out, I'd be appreciative. The best book that will be helping me is Object Oriented Programming with Visual Basic.Net. Its got a lot of the mechanics that would help with OOP (well, probobly all the mechanics really) but I need some theory books/tutorials/essays/etc on how to best organize code, how to plan for it, etc.
  9. I'm closer to #1. Took my first programming course 2 years ago and started programming 1.5 years ago. Just got my Associates Degree (2yr) in programming. Unfortunately I seemed to have been one of the more talanted students in class. I didn't need to plan for anything. Any assignment we had, I would just do. I finished a two course book in one course and took on special assignments the second semister. When we did planning in class, if the teacher let the students do the planning, I often just mapped out the plan in like 5 minutes. Because of this, I'm more of the #1, which is the worst. I havn't done a very large project until the one I'm currently working on. I started to plan a little, then started. :( I'm constantly writing up workaround Subs, changing older subs with overloads and parameters to get them to have more functionality. If I'd planned properly up front, I'd probobly be done with this program already. I really do want to learn how to plan out larger scoped programs, were to start on a program thats 8 forms and a database (or two). I saw mention of Software Metrics up above and I'm going to Google it, but if anyone has any advice or knows of any books that would help me out, I'd really appreciate it :D
  10. Yeah, I spent about a week or three working on my dataAdaptors at one point, with about a thousand lines of code and 80% of it unmanaged, and thus no way of checking errors other than testing and reading it line by line. I have 8 tables, most relational, most having 10+ fields... it was a nightmare.
  11. I have a DataConnection, 8 dataAdapters and a dataset all on my main form. By dragging my database from the Server Explorer, I saved like 20 pages of code setting up the dataAdapters. But now that most of my main work is done, I need to test on another machine. And the DataConnection is a fixed path to the Access database. I know how to change a path to make it dynamic, so that wherever you move your program, the database is found: Path = Application.StartupPath & "\Data.mdb" But in the visual controls, you're only allowed to select a predefined database path: Ex: C:\Database\Test\Data.mdb You can change a fixed path, but not make it dynamic. I even went into the generated code for the control on the form and changed it there, but got an error that Application.StartupPath wasn't proper formatting. I tried to change the connectionstring on formload, right before I actually connect to the database, but the dataAdaptors must have already grabbed the old connection string because they keep using that. Is there a solution to this that would let me keep my dataAdaptors (I don't care about making other objects via code, but data adaptors with databases of 10+columns are a ***** to write properties for by hand) but let me change the database location to something more dynamic?
  12. I think mostly MS is playing on the part that it's their buisiness and others don't understand it. I understand they may have designed it in such a way that these elements could not be taken out. I also understand that it can also be designed in such a way that they can be taken out. Mostly they rig up their own dependencies. They have 30 programs running off the DLLs supplied with IE. If IE isn't there, those programs don't run. Of course if the DLL's are there and IE isn't, they'll still run. I had this issue with windows 98. I took internet explorer off and a LOT of programs stopped working. I reinstalled it (as non integrated) and they all worked fine, and I could use Netscape (which was still viable at the time).
  13. http://zdnet.com.com/2100-1104_2-5176508.html I'm starting to wonder if Microsoft thinks people are stupid. Now the EU (European Union) is telling them to take out media player and make it a download (or I guess an installation option). Microsft says that this too is not possible. They hardcoded part of it into the system. Microsoft claims that if they took Media Player out, that windows is fully incapable of playing songs and movies, even with other software like RealPlayer. You'd think after the whole internet explorer crud, MS would make moves to program their components componently and not hard code them into the system. Personally I don't care if Windows Media Player is there, or if Internet Explorer is there on the machine. Hard drive space isn't that much of an issue. What I do mind is how Media Player is an awful, one of the worst, media players and and it has a habit of just grabbing the reins and reassociating with all the files. One version I had, you couldn't get the files to associate with anything else.
  14. Not the answer I was hoping for, but thanks for giving it :D
  15. A note on a "uni". I actually just graduated from a 2yr community college. Hardly a university, though it did spend more time on practical and less on theory. My friend is going to a university that offers BA, MA and Doctorates in computers. You don't even touch a computer in most of your first year classes. Database 1 you don't touch the computer. Programming 1, you don't touch the computer - though they do start you off learning C++, but again, without the computer. Its ALL theory. When I first stepped into college like 7 years ago, I took a semister. A lame class on "generic PC stuff" (word, excel, access v3, etc). Then I dropped out. I had nothing going my way in terms of a career or good job. Just junk. I went back to school two years ago. I wanted to do Networking and System Administrations. Again, no formal experience, but I ended up managing a jury rigged computer network with a server box sharing the internet for 5 computers in a house. So I figured I had a knack, I might like it. I had to take Visual Basic 6. I got the book, loaded it on my computer and I was like ?? This is jibberish. The class started and it was like one of those cut scenes in a movie were the music starts to play and it just shows people learning. I LOVED it. I learned it, I wanted to learn more. Just for fun. By the time I took the second semister of the course (a year later) I'd already surpassed the class (The book covers both halves of the class) by finishing the entire book on my own. I took Systems Administrating and learned it was the most tedius boredom of my college career. I'm far from a master computer programmer (or anything computer related), but college gave me a sampling of what is out there, so I can choose what I like and don't like. It also gave me a foundation to build on. Once you learn a language properly, its really easy to apply to another language. I work in VB6, VB.Net, ActionScript (Flash internet programming) and I'm starting on C# and ASP.Net. I'm confident that if I were required to learn Delphi or C/C++ or any other programming/scripting language, I'm only a book away from adapting my skills to that language. I agree that you learn great theories and ideas in a Uni. You also learn in a "clean environment". The real world is far from that. Its trying to get it going. This is why I think other theories like Refactoring can be very important. I think both count. If you happen to pick up all of your foundations on your own, by reading books and whatnot, and develop good practices I'd say the only thing a Uni guy has over you is a Uni degree showing that he has a more well rounded education, more drive, commitment and desire to do what he does. That may not be true, but thats the message that's conveyed. It takes a LOT of character to balance job, family and school, and often times it just seems easier to take the easy way out and get a job doing what you can do. I think at some point, a lot of experience will still outweigh a fresh face from a Uni.
  16. You know, like our code/vb/c# tags. I wanted to post code up on a website via ASP.Net, like a tutorial, and have the code look like .Net code. does .Net support this display method inherently, or is there a class/component or procedure to do the formatting for you?
  17. What I'd like is to have XP style controls just as controls. Alternatives to normal controls. Doesn't matter what OS you're on, you can use them. The forms on XP look stupid. the buttons and other controls look pretty cool.
  18. Plenty of threads on this, plenty of answers from how to do it yourself, to telling .Net how to do it, to repainting buttons. I think this one most pertains to what you need: http://www.xtremedotnettalk.com/showthread.php?t=70100&highlight=style+buttons Heres the MSDN Link: ms-help://MS.MSDNQTR.2003FEB.1033/dv_vstechart/html/vbtchUsingWindowsXPVisualStylesWithControlsOnWindowsForms.htm Found it in the Controls category, under XP
  19. None needed, unless you're keeping track for some reason
  20. The For Each method: Dim ds As DataSet Dim dr As DataRow For Each dr In ds.Tables("TableName").Rows 'This For Each loop will run through the tables 'collection with dr acting as each datarow (record) 'in the table specified. 'Choose which item you're goin to add to which combobox ComboBox1.Items.Add(dr.Item("ColumnName").ToString) 'This loop will loop through every datarow in your 'datatable, allowing you to add each value of a particular 'column to your combobox. Next Datasourced: ComboBox1.DataSource = ds.Tables("TableName") ComboBox1.DisplayMember = ds.Tables("TableName").Columns("ColumnName").ToString The second is much cleaner and faster and has some advantages when dealing with things like a listbox which can change records depending on which item you select. The first has the advantage of you being able to play with your data. You can choose to concatonate two datacolumns (LastName, FirstName; Car, CarYear) and to sort them via the combo/listbox's sorted property (you can do the same in a datasource using the DataView.sort method). You can also add further items and change old ones at a later date. But then you have to do searches to find out which record text is from, and that's also more complex.
  21. Well, this is one of the best fields to do for yourself. This isn't Aluminum Siding, Car Sales, Accounting, etc were you need to prove that you know your stuff to get a job, but can't prove your stuff until you get a job. Screw it. Do it yourself. I opened my own Web Design & Computer Programming buisiness. I don't know the situation in Austrailia, but in the United States, it costs $35 to open a buisiness which can employ up to like 3 people, called a DBA (Doing Buisiness As), which is a fancy way of giving yourself a buisiness title. Now, most everything computer related is a tax writeoff as a buisiness expense. Everything relating to my buisiness is a buisiness expense. You don't even have to have buisiness lined up. Just open a buisiness, put your hat in the ring. I have a full time day job. I have programming projects on the side. Maybe someday I'll be making enough to quit my day job. In the mean time, I have over 8 months of professional VB experience, 7 months of that VB.Net. I'm hardly the most knowledgable, but I have the sourcecode and my applications saved on my porfolio disk. Most were when I worked at a bank, I had to interface random software that wasn't user friendly to make it "invisible". Like backups. We want a backup of the email server to happen at midnite while nobody is at work. The software is designed to require you to open an app, phsycially type in the source and destination (it doesn't "remember it") and then click "Backup". So I made a program that opens the backup utility and feeds it keystrokes. I use the API to bring the process to focus, then send in Tabs to navigate and strings to enter Paths. Its not a whole lot of code, but it was a to get started on. I could modify it to work with nearly any software. You have ideas? Open a buisiness, open a website, start on your ideas. Give them out for free, but with your logo and name on them. This is one of the few professions were you don't even need a client to do work and still show tangable results. Even if you're just making a large "portfolio" of works, someone may take a look and say "This guy knows more than than the guys with more experience" Also remember that .Net is nearly internet integrated in various ways. You can't have 10 years experience with .Net, and someone else with 10 years experience with Delphi isn't nessicarily the best candidate for a company looking to integrate PC Desktop and Internet Apps using .Net. Sell yourself, sell what you can do. Sell what you want to do. But have some work to prove it. Whats the difference between 8 guys with their fancy resume's and me? I have proof that I can do the work. A full third, if not half of my programming courses in college passed, but had no friggin clue. They floated on the final projects by leaching off of someone who could program. By scholastic transcripts, they're on even footing with me, or better. But I'm the one who knows how to do it, not them. Give everything a shot, send Demonstration programs to people. Send in a disc as part of your resume (an 8/16meg jump drive if you want to be fancy) you want to stand out. You'll be rejected and you'll keep learning and gaining more experience. One piece of advice. If you go into an interview and they have the cajones to turn you down in person (and not any "Well get back to you" B.S.), ask them why. What were you lacking. Don't argue or beg, but try to find out why you wern't the right candidate. Then you'll have someplace to work on.
  22. No. It displays text. If you can figure out a way to convert a string into code (I don't know how to do it in vb.net) then that would work. A DataTable would store your information to display and could link to the Key in your collection, which is too much work if you can do it all in a single object within your collection. That's why I said that a Datatable is superior for displaying/accessing text, especially multiple items that need to stay parallel, but won't do much good for non-string objects. Don't get me wrong, if you're suave enough, you can do a LOT with collections. A DataTable is just a collection of DataRows. A DataRow is just a collection of DataColumns. I'm pretty sure DataCoumns are either a collection or array of strings. You can do the same yourself to meet whatever needs you may have without resorting to DataTables, it just happens to work well with DataView and work well out of the box as a great way to manipulate groups of strings, including displaying them. Just curious for the sake of learning, how do you store code in a collection? I have some ideas involving classes/objects, but I'd like to see how its done.
  23. A lot of things don't work the same/correctly when you've got the datasource on. Refresh looks into it's own item collection, not the datasource. Sort tries to sort its own item collection and throws an exception if it's databound. This is why I skip the hoopla and use a datatable. Its a better version of a collection for non performance needs. It acts like a collection in terms of not needing an index, expandability, but is limited to text. With a collection, you can have "A" Key, but you can't get it to tell you what the key is again (like printing a list of Key - Information) that I can tell. A DataTable can have a "Key" (just call a column Key, or whatever you want) and also can link up to many other text items rather than one, you just add more columns. You can even use SQL statements (or VB) to play with data and put it in another row. Frex: You collect FirstName and LastName and put them into a DataTable with a ClientID# as a Key of sorts. You can then have another column called "FullName" which has LastName, Firstname. You can feed this column to a list/combo box, which can only accept one column, but you've got two columns worth of data being displayed. Then when you use it, you set it to a DataView, you can filter and sort very easily the change IS reflected by a listbox. Using collections you'd have to build custom objects to store this sort of data, and I'm kinda sketchy on how a List/combobox would display a custom object within a collection. Other than that, you'd have to have parallel Arrays/Collections to get this much data synched up. I'm glad you got it working though... had to fool it into changing datasources :p
×
×
  • Create New...