Thanks for the reply Chris. That ad hasn't reappeared thankfully. Returning to the topic, the devil remains in the definition of "worst offense". Personally, I'm not at all offended by typos and the "trim doubles and vowels" type of abbreviations. (I'm not even offended by Comic Sans which professional editors seem to find really bad :-D ) Enjoy. Murray.
dg6yhw11
Posts
-
CodeProject challenges -
CodeProject challengesSo as I'm reading this up pops an ad offering to help me "Check your arrest record". I would think that we "smartest and brightest" would know if we had been arrested :laugh: On the topic, I feel there's little need. The typos etc. sort of add character and are more representative of what we actually type all day long {var foo} etc. Also, many of our brethren are not native English speakers. Perhaps correcting their grammar might change the meaning of their posts. For instance... As a American, I often find the "Queen's" English somewhat confusing. I will never forget a lecture on computing I gave in England back in the 80's. The audience began tittering when I used the word "backslash". The tittering increased to the point that I had to stop the lecture and ask what was so amusing. It seems the word "slash" was slang for urinating outdoors. Who knew? I (stupidly) asked for their word to describe the character and, after some discussion, it was decided I should use "reverse oblique stroke". So, despite your probably justifiable (my son is an editor and takes great offense when he encounters similar wrongs) editorial umbrage at poor grammar, malapropisms and the like, I think you should keep them. Murray
-
Loop exitBASIC provides several exit statements such as EXIT LOOP EXIT FOR You can also set the condition in the call to the loop WHILE Not [answer you want is found] ... WEND will exit when the condition is met (of course you have to add another exit test to avoid infinite loops :) There are a bunch of similar constructs. To use this with some OOP type language just write a little function in BASIC (Visual Studio, PowerBasic), compile to a DLL and call it from the object you need to use. Visual Studio would probably let you do it all in the same project but then you wouldn't have the DLL to reuse.
-
Have you suffered from burnout, and how did you recover?I showed your post to my wife who instantly said - "Thyroid". My wife has the symptoms of mind being cloudy, inability to think clearly and inability to exert mental effort as well. In her case she doesn't have a thyroid gland (cancer) and has to rely on medication. These symptoms appear when the thyroid is too low. Perhaps you need to have a thyroid test. Good luck. Murray
-
Is this an acceptable practice?I would say it is not acceptable because your intent is not clear, which makes the code difficult to maintain.
-
for(int i=0; i<size; i++)Fascinating! I know and still use that convention but had no idea what that particular set of letters was chosen until now. Thanks. Murray
-
Missing COBOLHow about the simple act of printing? Controlling a printer is a nightmare using VS.
-
Missing COBOLGood luck with that. I've been writing LOB apps for 25 years now. The only one of those "tools" that might be helpful is the Transact-SQL in SQL server. LOB apps are procedural by definition. Humans don't think in objects. OOP simply doesn't work (unless you have a team including a full-time documenter to remember all those ?@#?% objects). And don't forget about money. None of the current MS products handle currency transactions properly unless you decide to work in pennies. They all produce rounding errors that you have to handle. No version of C will do money properly. Especially when chaining transactions ((Qty * price = sale)* sales tax) for example. Any multiplication involving fractions of percentages ending in 5 (1.45% for example)will round unpredictably. COBOL uses BCD math that produces accurate results. We are actually considering moving our main app into COBOL because the "modern" tools are too complex and way, way too verbose.
-
M$ - new API's with no new offering in terms of capability and missed out on rise of smartphonesActually it doesn't. The area you refer to is more of an NFL-style goalpost with XAML in the middle of the cross but the traditional languages still can see the "sky". Just sayin...
-
What exactly doesn't work?As a professional I can see nothing wrong with Win 8. It is much faster and the apps we write run better on it. Marginally better, but better non the less. The huge brouhaha centers around the interface which seems to evoke strong reactions especially among desktop developers. The reality is that a shrinkwrapped app, like ours, simply installs as usual and its desktop presence is an icon within a tile. Click the tile and the app starts and runs. There is no need whatsoever to program to the whole-window "Metro" sytle if you don't want to. And there is a slew of new hot-keys that can help improve your productivity. Whether you adopt it personally, I think, depends on your user base. If you think your users will adopt it, then you should as well; if only to be able to support their use of your product. It's a good, working and workable product. Definitely no Vista. But it is not a "Must have". Hope this helps.
-
Spaghetti codeI agree about feature additions messing up "beautiful" code but I think everyone is missing the main reason spagetti code exists. That is QC. In our organization, if any change is made to an existing and tested block of code, the whole block has to be re-tested. This increases the costs and delays shipment. Anyone can write pretty code given the time. It takes a special skill set to modify existing code without breaking it. And if that results in spagetti code over time, so be it. It works. Just document the code so the next skilled worker knows what you did.
-
The Developer Is Always WrongThat is so cliched and arrogant. Our job as programmers is to enable our users, no matter what their skill levels, to interact successfully with the system we design. If they cannot, then we have failed our job. We have to remember that our users may not have 3-digit IQ's or schooling beyond grade school; that they may not be native english-speakers, they may have a physical handicap, and may be distracted by any number of other issues. Years ago another programmer I know was faced with the task of getting people whose main skill level was not being blind to enter vital data. She tried the customary textboxes and buttons, only to have the users require huge training and a high error rate. She came up with a large button with a cute rabbit on it. The users were trained to "type the number then push the bunny". It worked. While we haven't adopted actual animal graphics, we do have a process we call "to bunny-ize" whenever a part of our UI requires a lot of user support. Murray
-
Why do Norton antivirus is so hated?I am especially pissed @ Norton because it interferes with my users' ability to install updates. If, like us, you only have a few thousand users or under 1 million or so downloads per year, it warns you that nobody is downloading this product so, ipso facto, it must be dangerous. If we had buckets of money we'd sue them. (Actually, it could make a nice class-action suit if all small developers got together. :) ) Symantec is in the business of selling fear so they block anything that they don't know about with huge, frightening warnings. These generate fear which generates income. McAfee is almost as bad. Give them a few iterations and they will be. Norton products are probably useful to protect your family and most clueless web users from the predators. Norton products are dangerous for businesses in that they can cause essential updates to do uninstalled because their messages arouse such fear. A large percent of our post-release support calls concern Norton and McAfee. These products also interfere with Registry settings and operations. Once we had to wipe a developer's machine because Norton had somehow permanently blocked access to the Registry areas that concern SQL Server. We have removed all these fear-mongering products from our operation - replacing them with Microsoft Security Essentials which is free, doesn't interfere, and effective. As to the gentleman who said Norton products weren't too slow, he must be running a multi-cpu overclocked box or dreaming in color. They are boat anchors in the real world.
Murray
-
Need advice on printing reports from Visual BasicYou're right - I've never heard of it. I used COBOL and FORTRAN on IBM mainframes. Then again I've never worked on government-scale databases. No wonder my friends who code for the IRS moan when Congress enacts a payroll change and gives us 30 days to implement it. I must assume that mainframes still exist although I saw a Cray supercomputer in a box about the size of a PC only twice as wide. Microsoft was offering it as a prize.
Murray
-
Need advice on printing reports from Visual BasicHi Jack, You're so right about the detail work that it is capable of. I looked @ it some more and it is really nothing more than an extremely complicated version of what I use in VB 6. The abilities for placements, fonts, kerning, leading and so on are excellent. They do require attention to detail but, what non-trivial programming doesn't? Attention to detail is what separates the hacks from the professionals. What language did you code in?
Murray
-
Weird TABCTL32 ErrorI suspect you have an earlier version on that machine. Look in Windows\System32 or Windows\SysWOW64 (for 64-bit systems) and check the version. 6.0.90.43 and up work fine on Windows 7. You can just copy the newer one over the others (after unregistering of course). Alternatively you can just put the ocx in with your binary. VB 6 looks first in the folder that the binary is started in, then in Windows\System. Don't forget that Windows 7 is a bitch to install in. If you're using InstallShield then make sure that the installation requires Administrator privileges. UAC can block system updates even with elevated privileges, so we often have users disable UAC temporarily during an install. (Would you believe UAC blocks installing a font ?!!) Also, beware Symantec and McAfee products. Disable them if present.
Murray
-
Need advice on printing reports from Visual BasicHi Jack, Thanks for the link to the ebook. Actually the process is pretty much as I described for VB 6, just with a lot more typing. (When I was in school we used to say that COBOL was a horrible language to code in because of all the keyboarding involved. COBOL is a walk in the park compared to VB 10, even with intellisense.) My products do payroll everywhere there is a US payroll and other government forms so you can just imagine the amount of reports we have to print. The page you sent did have links to a couple of books you might find helpful.
Murray
-
Need advice on printing reports from Visual BasicAny time, Jack. You know there is another version of Basic that is procedural and hence much easier to use. It does have statements as easy as print something. I used it to produce 4 commercial products for 10 years. It is called PowerBasic. www.powerbasic.com I only stopped using it when I was forced to remake our products for Windows. It didn't have any GUI support at all in the beginning although it does now. It also has a huge user community with tons of free code. Happy Memorial Day.
Murray
-
Need advice on printing reports from Visual BasicAs I hope I mentioned I am a VB6 expert who has assiduously avoided the .NET realm so far. (I manage 435,000 lines of code that I do not want to convert). Although that will have to change. I would have to assume that the printer object (if available) is defined in the System namespace. Did you try system.printer.print "Hello World" If that doesn't work then I'm sorry but I'm out of ideas.
-
Need advice on printing reports from Visual BasicI don't use a PrintDocument control either. Just the printer. Here's a complete sub we currently use Public Sub PrintMaintenanceRenewalLetters( _ rsIn As ADodb.Recordset, _ PayDOSCustomersIn() As String, _ DoingReminderIn As Boolean, _ Optional StartFromIn As Integer = 1, _ Optional Recs2Print As Integer = 9999, _ Optional CustNumberIn As String = "-X") Dim CustNoHold As String Dim LastLine As Single Dim iCtr As Integer Dim StateTablesBought As Integer Dim CDAdder As Currency Dim ExtPrice As Currency Dim ExtFreight As Currency Dim SalesTax As Currency Dim QtyBought As Long Dim BkMark As Variant ' Const FED_PART_NO As String = "87FEDST-03" ' Const FED_DESCRIPTION As String = "Tax Table Service Fed + 1 State" ' Const FED_PRICE As Currency = 45# ' Const OLD_FED_PART_NO As String = "87003-04" Const FREIGHT_CHARGE As Currency = 3.95 LastLine = Printer.Height - 1440 Dim Ctr As Integer Ctr = 0 CustNoHold = "" If StartFromIn > 1 Then Do If Trim(rsIn![Customer_Number]) <> CustNoHold Then CustNoHold = Trim(rsIn!Customer_Number) Ctr = Ctr + 1 End If rsIn.MoveNext Loop Until Ctr = StartFromIn rsIn.MoveNext CustNoHold = "" ElseIf CustNumberIn <> "-X" Then Do If Not rsIn.EOF Then rsIn.MoveNext If rsIn.EOF Then Exit Do End If Loop Until (Trim(rsIn![Customer_Number]) = CustNumberIn) Or rsIn.EOF If rsIn.EOF Then MsgBox "Customer Number " & CustNumberIn & " not found!", vbCritical + vbOKOnly, "Error" Exit Sub End If CustNoHold = "" End If Do Do If Trim(rsIn![Customer_Number]) <> CustNoHold Then If CustNoHold <> "" Then ' Print the CD adder Printer.FontBold = True Printer.ForeColor = vbRed Printer.Print Printer.CurrentX = DESCRIPTION_LEFT Printer.Print "____"; Printer.CurrentX = DESCRIPTION_LEFT + 450 Printer.Print "Please send my services on a CD" Printer.CurrentX = DESCRIPTION_LEFT + 450 Printer.Print "ins