(Link to AcmlmWiki) Offline: thank ||bass
Register | Login
Views: 13,040,846
Main | Memberlist | Active users | Calendar | Chat | Online users
Ranks | FAQ | ACS | Stats | Color Chart | Search | Photo album
05-03-24 11:42 AM
0 users currently in Programming.
Acmlm's Board - I3 Archive - Programming - Let's Rant about Visual Basic! New poll | |
Pages: 1 2 3 4Add to favorites | Next newer thread | Next older thread
User Post
Guy Perfect









Since: 11-18-05

Last post: 6285 days
Last view: 6284 days
Posted on 12-24-06 06:16 AM Link | Quote
You can break execution at run-time within the IDE by using the Ctrl-Pause/Break key combo. Works well with infinite loops. A holdover from the QBASIC days.
Cellar Dweller +

Red Koopa









Since: 11-18-05
From: Arkansas

Last post: 6293 days
Last view: 6283 days
Posted on 12-24-06 06:34 AM Link | Quote
Let's see, VB is Windows only, does not have bit shift operators, doesn't have pointers, and is designed for people who barely know how to program.

Paul Graham explains very well how programming languages can vary in power when he makes his case for Lisp being the most powerful programming language. I thing that the following paragraph explains it well:
Originally posted by Paul Graham at http://paulgraham.com/avg.html
As long as our hypothetical Blub programmer is looking down the power continuum, he knows he's looking down. Languages less powerful than Blub are obviously less powerful, because they're missing some feature he's used to. But when our hypothetical Blub programmer looks in the other direction, up the power continuum, he doesn't realize he's looking up. What he sees are merely weird languages. He probably considers them about equivalent in power to Blub, but with all this other hairy stuff thrown in as well. Blub is good enough for him, because he thinks in Blub.
I think that those who have used any dialect of BASIC and then used another language will clearly understand the above paragraph.

Originally posted by Ogama Dobe
VB blows. We signed up for this class in the hopes that we would learn how to make games. Yet we have had no promises. No nothing. We did nothing of the sort in QB either.


Most practical programming classes are aimed at students planning to program in a business environment. VB is designed for programming simple one off business apps by marginally skilled programmers, so I would not expect to learn about programming games in a VB class.
HyperHacker

Star Mario
Finally being paid to code in VB! If only I still enjoyed that. <_<
Wii #7182 6487 4198 1828


 





Since: 11-18-05
From: Canada, w00t!
My computer's specs, if anyone gives a damn.
STOP TRUNCATING THIS >8^(

Last post: 6284 days
Last view: 6284 days
Posted on 12-24-06 09:15 AM Link | Quote
Originally posted by Guy Perfect
You can break execution at run-time within the IDE by using the Ctrl-Pause/Break key combo. Works well with infinite loops. A holdover from the QBASIC days.

Yeah, I wish I'd known that at the time.
Sukasa

Birdo
Not quite as active as before.
Xkeeper supporter
Xk > ||bass
I IP Banned myself! Twice!








Since: 11-17-05
From: Somewhere over there

Last post: 6284 days
Last view: 6283 days
Posted on 12-24-06 10:01 PM Link | Quote
I've used it before, too. Very helpful.

I find that I don't really have problems with VB6. If there's something I want to do, there's usually code, an API call, or a combination of the two that can do what I want. And yeah, that article is spot-on. I agree with everything it says. For bit shifting, I find it easy enough to use division by powers of two, and it wouldn't be at all hard to just write a function that can bit shift. I don't have any experience with pointers, though, so I can't comment on them. And as far as the Blub analogy goes, well, VB6 is my Blub.
Kyoufu Kawa
Intends to keep Rom Hacking in one piece until the end








Since: 11-18-05
From: Catgirl Central Station

Last post: 6283 days
Last view: 6283 days
Posted on 12-24-06 10:05 PM Link | Quote
Fun fact: when you write your own message processor, you might want to do messages like "WM_RESIZE" or what was it. In fact, Sappy does this to lock horizontal sizing and limit vertical without flickering.

Unfortunately, the message passes a pointer to a struct. VB can't do that, as we know.

So I CopyMemory the passed struct to one of my own, edit that and CopyMemory it back.

Problem solved, case closed.
Guy Perfect









Since: 11-18-05

Last post: 6285 days
Last view: 6284 days
Posted on 12-25-06 07:33 PM Link | Quote
Mr. Graham certainly describes very well the typical mindset of a programmer. I've seen through experience that programming languages are kinda like political ideals... people defend theirs tooth and nail even if they have no idea what the other ones are like. And as such, since Grandma and Grandpa were associated with a specific one, there's no need to even consider the existence of the others.

It depends on what your needs are. If you want a programming language that can accomplish just about any conventional task and is easy to work with, then Microsoft Visual Basic is a viable candidate. If you want something that can compile on other operating systems, then VB is not the candidate of choice. If you don't need your programs to run on other operating systems, then VB is a viable candidate.


Originally posted by Cellar Dweller
[Visual Basic] is designed for people who barely know how to program.
In the world of debate, this comment is classified as what is called prejudice. It's a judgemental statement that is almost always prompted by an affinity for an alternate point of view and is typically underinformed.

I don't know your Blub, Cellar Dweller, but unless you were on the design committee at Microsoft when designing Visual Basic, I don't think you'd be able to conclude that it was designed for those "who barely know how to program." Again, I use the example of the F-Zero X level editor. I used Visual Basic and a Microsoft-provided, VB-targeted type library to work with OpenGL. If Microsoft didn't intend for VB to be used by those who are proficient in programming, then they wouldn't have given it the capabilities they did.

Microsoft holds true to one of the original concepts of BASIC: to protect the user from the operating system. As such, they never implemented ways to manipulate pointers, but they certainly provided a way to access them. The undocumented VarPtr() function and AddressOf operator were made for that very reason; such that VB programmers will still be able to use memory addresses in their programs, even if they can't access memory directly by that manner.

I also know through experience and by example (see above) that pointers and bit shifting are not required for most things. If you don't need them to make a 3D editor for a Nintendo 64 game, then they must not be significant weaknesses of the language.
Kyoufu Kawa
Intends to keep Rom Hacking in one piece until the end








Since: 11-18-05
From: Catgirl Central Station

Last post: 6283 days
Last view: 6283 days
Posted on 12-25-06 09:47 PM Link | Quote
Originally posted by Ogama Dobe
We signed up for this class in the hopes that we would learn how to make games. Yet we have had no promises. No nothing. We did nothing of the sort in QB either.
IGIARI!

In my dad's class, my first assignment was to write a Tic Tac Toe game in VB.Net. Now I don't like .Net much, and cheated with an open-source IDE, Sharpdevelop (#Dev).

The second was a Pong clone.

The third and final task a higher/lower number guessing game, wtf?
Sukasa

Birdo
Not quite as active as before.
Xkeeper supporter
Xk > ||bass
I IP Banned myself! Twice!








Since: 11-17-05
From: Somewhere over there

Last post: 6284 days
Last view: 6283 days
Posted on 12-26-06 11:31 PM Link | Quote
higher or lower? Dude, ouch. My class got to stuff that was fun and there was always room for modifying the assignment. Some of the assignments included a Blackjack game, and a program for Klunker Kar Kompany, and other thigns along those lines. Plus, if we wanted to expand upon/change part of oru assignments, we were allowed to as long as we larned the focal lessons of the programs.
HyperHacker

Star Mario
Finally being paid to code in VB! If only I still enjoyed that. <_<
Wii #7182 6487 4198 1828


 





Since: 11-18-05
From: Canada, w00t!
My computer's specs, if anyone gives a damn.
STOP TRUNCATING THIS >8^(

Last post: 6284 days
Last view: 6284 days
Posted on 12-27-06 05:20 AM Link | Quote
I did silly things like Pong, Don't Hit The Cow (you move your mouse to prevent the cursor from hitting this one stationary cow as the road scrolls by), crappy Pac-Man clones, and other random junk like that. One of our projects was just to make something in Java that used images and scrolling backgrounds. I made a Pokémon Silver map renderer using graphics stored in bitmap files.

One amusing one we did was a program that had you enter an amount of money and it calculated interest on it or something. I made mine look like a malfunctioning "Eye-Bee M" bank machine - you put in a random name and password (just mash anything and hit Enter), then it says something like "system error, re-enter account balance". Mr Graham (freaky coincidence?) was amused, so bonus.


(edited by Alice on 12-26-06 11:22 PM)
BriGuy92

Red Goomba








Since: 09-10-06
From: That dot on the globe

Last post: 6305 days
Last view: 6288 days
Posted on 01-04-07 06:07 PM Link | Quote
Originally posted by Sukasa
higher or lower? Dude, ouch. My class got to stuff that was fun and there was always room for modifying the assignment. Some of the assignments included a Blackjack game, and a program for Klunker Kar Kompany, and other thigns along those lines. Plus, if we wanted to expand upon/change part of oru assignments, we were allowed to as long as we larned the focal lessons of the programs.
Wow. I want your VB teacher. Ours class is so boring! We did a number guessing game in Qbasic (blah) but nothing of the sort in VB. All we ever do is make boring, business-type apps. You know, Inventory reports, Order forms, and the like. Some of it is kinda interesting, but, just like Dobe said,
Originally posted by Ogama Dobe
VB blows. We signed up for this class in the hopes that we would learn how to make games. Yet we have had no promises. No nothing. We did nothing of the sort in QB either.



(edited by BriGuy92 on 01-04-07 12:23 PM)
Ogama Dobe

Rope








Since: 11-15-06
From: The Darkness of my Soul

Last post: 6283 days
Last view: 6283 days
Posted on 01-04-07 06:43 PM Link | Quote
Bri asked me to post so as to enable him to post. Please don't get angry at me.
BriGuy92

Red Goomba








Since: 09-10-06
From: That dot on the globe

Last post: 6305 days
Last view: 6288 days
Posted on 01-04-07 06:48 PM Link | Quote
Originally posted by My VB code
' Math Application

Option Explicit
'
'Random numbers used throughout the code
Dim num1 As Integer, num2 As Integer



Private Sub chkDisplay_Click()
'Hide or display summary info

If chkDisplay.Value = vbChecked Then
fraInfo.Visible = True
Else
fraInfo.Visible = False
End Sub

Private Sub cmdExit_Click()

End ' Exit the application

End Sub

Private Sub cmdVerify_Click()
'Verify answer and take appropriate actions

Dim userAnswer As Integer, correctAnswer As Integer
Static numCorrect As Integer, numIncorrect As Integer
Dim reply As String
Const OPTIONS As Integer = vbOKOnly + vbInformation + vbDefaultButton1 _
+ vbApplicationModal


'Calculate correct answer
If optAdd.Value = True Then
correctAnswer = num1 + num2
Else
correctAnswer = num1 - num2
End If

'Compare user's answer to correct answer
userAnswer = Val(txtAnswer.Text)

If userAnswer = correctAnswer Then

'Display or remove smiley
imgIcon.Picture = imgHappy.Picture
'Display new problem or prompt with message
txtAnswer.Text = ""
Call RandomNumbers
'Increment counter
numCorrect = numCorrect + 1
Else
'Incorrect answer, remove happy face, increment counter, prompt for re-attempt
imgIcon.Picture = LoadPicture()
numIncorrect = numIncorrect + 1
reply = MsgBox("Try Again", OPTIONS, "Wrong Answer")

'Highlight answer so user doesn't have to backspace
txtAnswer.SelStart = 0
txtAnswer.SelLength = Len(txtAnswer.Text)
End If

'Move couunters into labels and cursor to answerbox
txtAnswer.SetFocus
lblCorrect.Caption = numCorrect
lblIncorrect.Caption = numIncorrect

End Sub

Private Sub Form_Load()
'Set Default option buttons when loading the form

'set level 1 and addition to default
optLevel1.Value = True
optAdd.Value = True
'this will trigger their click events

End Sub



Private Sub optAdd_Click()

Call RandomNumbers

imgOperator.Picture = imgPlus

End Sub

Private Sub optLevel1_Click()

Call RandomNumbers

End Sub

Private Sub optLevel2_Click()


Call RandomNumbers 'Passes control to sub-procedure
'Returns to statment after call

End Sub

Private Sub RandomNumbers()
'Generate and display two random numbers

Dim temp As Integer 'Used for swapping num1 with num2

Randomize

'Range of numbers based on level of student
If optLevel1.Value = True Then
num1 = Int(10 * Rnd) + 1
num2 = Int(10 * Rnd) + 1
Else 'Level 2 MUST have been selected
num1 = Int(91 * Rnd) + 10
num2 = Int(91 * Rnd) + 10
End If

'Swap numbers for subtraction
If optSub.Value = True And num1 < num2 Then
temp = num1
num1 = num2
num2 = temp
End If
'Move values into appropriate labels
lblNum1.Caption = num1
lblNum2.Caption = num2

End Sub

Private Sub optSub_Click()
Call RandomNumbers

imgOperator.Picture = imgMinus
End Sub

Private Sub txtAnswer_GotFocus()
txtAnswer.SelStart = 0
txtAnswer.SelLength = Len(txtAnswer.Text)
End Sub


Yeah. If you know what this means, you know how stupid this class is.

Admins, if you don't like this huge post, I'm sorry.


(edited by BriGuy92 on 01-05-07 11:43 AM)
Kyoufu Kawa
Intends to keep Rom Hacking in one piece until the end








Since: 11-18-05
From: Catgirl Central Station

Last post: 6283 days
Last view: 6283 days
Posted on 01-04-07 08:05 PM Link | Quote
My dad's a whacko, it runs in the family. He's also my CS teacher.

When I showed him Pong in MAME, he was amused to see me make the Pong clone I was supposed to write look like the one in MAME. Blockball and white paddles on black instead of red, green and blue paddles 'n ball on windefault gray.
HyperHacker

Star Mario
Finally being paid to code in VB! If only I still enjoyed that. <_<
Wii #7182 6487 4198 1828


 





Since: 11-18-05
From: Canada, w00t!
My computer's specs, if anyone gives a damn.
STOP TRUNCATING THIS >8^(

Last post: 6284 days
Last view: 6284 days
Posted on 01-05-07 02:58 AM Link | Quote
Hah, that reminds me of the assignment "make a clock using the Timer control". My code looked something like this:

Private Sub Timer1_Count 'I haven't used VB in years so I don't remember how this part actually goes
Text1.Text = Time
End Sub


Sukasa

Birdo
Not quite as active as before.
Xkeeper supporter
Xk > ||bass
I IP Banned myself! Twice!








Since: 11-17-05
From: Somewhere over there

Last post: 6284 days
Last view: 6283 days
Posted on 01-05-07 04:36 AM Link | Quote
Close, Timer1_Timer()

Our teacher is learning more flash actionscript this year for his students, as he splits the programming class 50/50 VB6 and flash.
Mega-Dog



 





Since: 11-19-05
From: Minnesota

Last post: 6305 days
Last view: 6286 days
Posted on 01-05-07 01:43 PM Link | Quote
VB IMO is an enviroment capable of alot. All of my windows NES editors were coded in it. Also it does have pointers and bit-shifting, just some simple 3-4 lines of code to do it. Now VB.NET blows and is really confusing...
Sukasa

Birdo
Not quite as active as before.
Xkeeper supporter
Xk > ||bass
I IP Banned myself! Twice!








Since: 11-17-05
From: Somewhere over there

Last post: 6284 days
Last view: 6283 days
Posted on 01-05-07 08:46 PM Link | Quote
I find multiplying or dividing by powers of two is close enough for me when I need to do bitshifting.

Offtopic, but My CS teacher *rocks*. He keeps Starcraft and tribes Vengeance on the School computer hard drives
BriGuy92

Red Goomba








Since: 09-10-06
From: That dot on the globe

Last post: 6305 days
Last view: 6288 days
Posted on 01-17-07 05:46 PM Link | Quote
Wow. How many really cool teachers do you have?
Sukasa

Birdo
Not quite as active as before.
Xkeeper supporter
Xk > ||bass
I IP Banned myself! Twice!








Since: 11-17-05
From: Somewhere over there

Last post: 6284 days
Last view: 6283 days
Posted on 01-17-07 09:50 PM Link | Quote
They're all cool, actually
And I'm looking at visual Basic, and yaeh, I've run into it's slowness issue. I think there are two reason for this: first off, I'm using the windows GDI for my graphics work (IIRC it's insanely slow), so I'm looking into directdraw, and the message pump is supposed to be crappy. Really, other than that I've had no problems with VB6, and I don't believe that it's a poor language.
Kyoufu Kawa
Intends to keep Rom Hacking in one piece until the end








Since: 11-18-05
From: Catgirl Central Station

Last post: 6283 days
Last view: 6283 days
Posted on 01-18-07 07:30 PM Link | Quote
Originally posted by asakuS
They're all cool, actually
I'm using the windows GDI for my graphics work (IIRC it's insanely slow), so I'm looking into directdraw, and the message pump is supposed to be crappy
OBJECTION!

My first attempt at a fighting game used GDI exclusively for it's graphics and was as fast as a greased hedgehog. In my last attempt, I found out that lowering the color depth helped for DirectX.

Also... unless you go subclassing, there IS no message pump in VB programs. It's all delegated to events.
Pages: 1 2 3 4Add to favorites | Next newer thread | Next older thread
Acmlm's Board - I3 Archive - Programming - Let's Rant about Visual Basic! |


ABII

Acmlmboard 1.92.999, 9/17/2006
©2000-2006 Acmlm, Emuz, Blades, Xkeeper

Page rendered in 0.073 seconds; used 458.45 kB (max 596.07 kB)