Results 1 to 12 of 12

Thread: Most examples in the CodeBank are profoundly difficult to understand ...

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Sep 2014
    Posts
    341

    Most examples in the CodeBank are profoundly difficult to understand ...

    I guess I am not a newbie anymore? At least I have been learning & practicing VB/VBA for over a year now.

  2. #2
    PowerPoster SamOscarBrown's Avatar
    Join Date
    Aug 2012
    Location
    NC, USA
    Posts
    9,126

    Re: Most examples in the CodeBank are profoundly difficult to understand ...

    Post this in the Discussion forums, not here.....

  3. #3

    Thread Starter
    Hyperactive Member
    Join Date
    Sep 2014
    Posts
    341

    Re: Most examples in the CodeBank are profoundly difficult to understand ...

    Sounds like I am a newbie all over again ...

    P.S. Hope Moderator could help move this thread. Thanks & I'm sorry ...

  4. #4
    PowerPoster
    Join Date
    Feb 2006
    Posts
    24,482

    Re: Most examples in the CodeBank are profoundly difficult to understand ...

    You have a legitimate point but I'm not sure there is any solution.

    Sometimes I look at CodeBank posts as artifacts (in the archaeological sense). You may have to pick them apart, carefully studying how they are put together and then researching pieces of the dismantled result. Look up the API function, object method, etc. calls in the MSDN Library or other documentation provided for 3rd party libraries.

    But some items can be a lot of code, complex code, fragile code that breaks with the slightest modification, or all of the above. It could take a large amount of carefully crafted prose to describe the problem being solved, provide background information and resource links, break the solution down explaining each portion in detail, and how these pieces fit together. Some people are working through a communication barrier too: English may not be their native language and even when it is... not all of us are skilled writers, much less teachers.

  5. #5
    Super Moderator FunkyDexter's Avatar
    Join Date
    Apr 2005
    Location
    An obscure body in the SK system. The inhabitants call it Earth
    Posts
    7,900

    Re: Most examples in the CodeBank are profoundly difficult to understand ...

    Moved
    The best argument against democracy is a five minute conversation with the average voter - Winston Churchill

    Hadoop actually sounds more like the way they greet each other in Yorkshire - Inferrd

  6. #6

    Thread Starter
    Hyperactive Member
    Join Date
    Sep 2014
    Posts
    341

    Re: Most examples in the CodeBank are profoundly difficult to understand ...

    Quote Originally Posted by dilettante View Post
    You have a legitimate point but I'm not sure there is any solution.

    Sometimes I look at CodeBank posts as artifacts (in the archaeological sense). You may have to pick them apart, carefully studying how they are put together and then researching pieces of the dismantled result. Look up the API function, object method, etc. calls in the MSDN Library or other documentation provided for 3rd party libraries.

    But some items can be a lot of code, complex code, fragile code that breaks with the slightest modification, or all of the above. It could take a large amount of carefully crafted prose to describe the problem being solved, provide background information and resource links, break the solution down explaining each portion in detail, and how these pieces fit together. Some people are working through a communication barrier too: English may not be their native language and even when it is... not all of us are skilled writers, much less teachers.
    Then how many years more should I keep making efforts to be a real professional VBA / VB6 / VBScript User? I mean, that is a time when I don't really have huge troubles in understanding posts in codebank...

    How much more should I invest in learning.

  7. #7
    Super Moderator Shaggy Hiker's Avatar
    Join Date
    Aug 2002
    Location
    Idaho
    Posts
    38,943

    Re: Most examples in the CodeBank are profoundly difficult to understand ...

    Somebody suggested a rule of thumb being 10,000 hours. I have no idea where that came from, though. Frankly, I would say that you should expect to keep learning up until the time you get planted in the ground.
    My usual boring signature: Nothing

  8. #8
    PowerPoster
    Join Date
    Feb 2006
    Posts
    24,482

    Re: Most examples in the CodeBank are profoundly difficult to understand ...

    I wasn't saying that you are the problem, but that you have two things working against you:

    One is that it can be difficult and time consuming to create highly polished code and words to explain it, so most CodeBank items are going to be far from textbook quality learning tools.

    The other is that hard things are hard. Complexity is a fact of life and you just have to do the work to unravel and understand it.


    Usually as you learn each new platform (e.g. Windows) and each new programming language your previous experience is still useful and you have less to learn. There are places where some of that breaks down, for example going from VB to Java or VB.Net means more than losing the VB stuff but also losing much of the API-level stuff you knew because so much of that is more easily accomplished through the provided libraries than dropping to the API. But going to C++ you might find most of what you had learned is still applicable.

    Much the same happens when you go from Windows to another platform, for example Linux.


    I've been at this on a paid basis since 1975, and both platforms and languages come and go over time... and when they don't they change little by little. Yet there is a ton of stuff I still use dating at least as far back as my university days. Those platforms are gone and those languages are almost dead now, but the fundamentals are always there.

  9. #9
    Smooth Moperator techgnome's Avatar
    Join Date
    May 2002
    Posts
    34,522

    Re: Most examples in the CodeBank are profoundly difficult to understand ...

    something else to keep in mind, the codebank submissions tend to be a reflection of 1) the person that wrote it and 2) technology at the time.
    Meaning, for some of them, take it with a grain (or few grains) of salt... a lot of them aren't likely to be perfect, could probably stand a re-write, and just because one person (the poster) found it usefull doesn't mean anyone else will either. Also, sometimes documentation on it is limited because the poster understood it (well they wrote it) and so think it's blindly obvious as to what ti does and how it works... so it is what it is.

    For the large part VB is largely self-documenting when written with clear variables and objects. There are times when you get into some really cryptic syntax (lambdas come to mind) where it might be necessary to give the reader a heads up.

    Learning all this stuff just takes time... for some people it happens real quick, for others it takes longer... I doubt there is any hard and fast rule (or any guideline for that matter) that it takes X years or Y hours... it's an evolutionary process. One of the hardest concepts I had to learn was event programming in VB3... I had extensive (but non-professional) experience with process based programming - DOS-based, console type apps... using BASIC, Pascal, ADA, COBOL, and so on... so when I was handed a pile of VB3 install disks on my first day on the job and was told to "install this and start learning VB" ... it took 3 weeks to wrap my head around the event handlers... I could get it, "OK, I get that when you click on the button, it goes into this sub, but where [explitive] is the if statement that says 'if this button is clicked, run this sub'???" ... No matter how many times someone tried to explain it to me... I just didn't get it... finally the penny dropped - FM ... Freakin Magic... it "just knows" to run that sub. Everything has been mostly a cinch since.

    Point is that you just need to relax, soak up the info, try to find opportunities to use what you've learned - AND EXPERIMENT - try different things, learn to see opportunities to reuse concepts (if not code) and adjust to the current situation.

    And DO. NOT. GIVE. UP.

    -tg
    * I don't respond to private (PM) requests for help. It's not conducive to the general learning of others.*
    * I also don't respond to friend requests. Save a few bits and don't bother. I'll just end up rejecting anyways.*
    * How to get EFFECTIVE help: The Hitchhiker's Guide to Getting Help at VBF - Removing eels from your hovercraft *
    * How to Use Parameters * Create Disconnected ADO Recordset Clones * Set your VB6 ActiveX Compatibility * Get rid of those pesky VB Line Numbers * I swear I saved my data, where'd it run off to??? *

  10. #10
    You don't want to know.
    Join Date
    Aug 2010
    Posts
    4,578

    Re: Most examples in the CodeBank are profoundly difficult to understand ...

    You will never get to a point where reading code to accomplish an unfamiliar task will always be easy and straightforward. Ever. I'm 10 years in and still see things in my languages of choice that make me have to stop and tinker and fiddle before I understand what's going on.

    Now, I'm not defending the code bank entries, maybe they aren't as clear as they could be. But I find if a tutorial isn't 8-10 pages worth of text it usually isn't a Petzold-quality deep dive that leaves no stone unturned. I've written those before, but they take 3-5 weeks of free tieme and several rounds of editing. Not only do few people write those, fewer people read them today.

    All I ask for in a tutorial these days is some code that builds and compiles I can copy/paste into a playground. Then I'll spend an hour or two breaking it and putting it back together. When I'm done, I'll know a lot more than when I started, but usually I need someone to provide that first little template to get me there.

    For reference: I'm teaching myself Swift right now. Learning the language is the easy part, after reading the reference for about an hour I can make sense of it and write simple programs. But learning CocoaTouch and the iOS libraries? Well, that's a set of thousands of classes, each with dozens of members, and I need to be familiar with a few hundred of those before I "know" iOS development. I'm not going to get that in 24 hours or 21 days. I'm expecting to spend years on it.
    This answer is wrong. You should be using TableAdapter and Dictionaries instead.

  11. #11
    PowerPoster
    Join Date
    Feb 2006
    Posts
    24,482

    Re: Most examples in the CodeBank are profoundly difficult to understand ...

    Perhaps I misread the original question somewhat. If it something more like "How much more climbing until I can see the top of this hill?" that's very difficult to answer.

    Remember that Basic was designed to make the rudiments of computer programming accessible to students of non-technical curricula from its very inception, while Visual Basic was designed to make Windows GUI-based programming more accessible as well as cheaper and faster to accomplish. Portions of Visual Basic were then taken and eventually repackaged as VBA to replace earlier Basic-derived macro languages in Office applications.

    The rudiments of these languages are both easy to pick up and useful by themselves, where many other programming languages require a lot more study in order to get beyond displaying the result of an arithmetic expression or a cheery "Hello World." But as VB evolved people needed to push it futher and further so more complexity was piled on version after version. This means you reach a point fairly early on where the learning curve gets steeper, and once you begin exploring raw API calls it only gets steeper still. At that point you are learning both Win32 and the quirks of VB's extensions allowing calls into Win32. Several entire books have been written on such topics alone.


    Think of it as a trip overland from New York to the mythical nirvana of San Francisco:

    Name:  terrain.png
Views: 169
Size:  12.6 KB

    You may be in Ohio with no clue what lies ahead of you yet.
    Last edited by dilettante; Aug 31st, 2015 at 05:44 PM.

  12. #12
    Super Moderator Shaggy Hiker's Avatar
    Join Date
    Aug 2002
    Location
    Idaho
    Posts
    38,943

    Re: Most examples in the CodeBank are profoundly difficult to understand ...

    Furthermore, a clever algorithm can be exceedingly clever, which can make it quite hard to understand. Fortunately, you don't need to swallow the whole elephant in one bite. Learn what you need to solve the problem at hand, then go on from there.

    For example, I started into Genetic Algorithms at about the time I started into programming. That would be largely impossible without a specific problem that needed to be solved, because you could spend years studying GA design and if you had nothing to do with it you'd likely forget it all before you ever used it. In my case, I had a specific problem to solve and learned quite a bit about coding dealing with that one problem. That didn't teach me anything about I/O, networking, databases, and many other topics. Other problems came up and I learned other things while solving those problems.

    So there isn't any need to solve everything one time. As far as specific algorithms go, there are complexities to .NET such as LINQ and Lambdas that are entirely optional. All of that stuff can be done other ways with varying amounts of work. However, you may very well see an example that makes use of LINQ to solve some specific problem, and if you don't know LINQ you probably would find such a solution very hard to understand. At that point, you have the choices of figuring out LINQ and how it is used to solve that problem, accepting the solution as is (if it works for you), or moving on to a different topic if the solution isn't relevant to you.

    You just don't have to learn it all.
    My usual boring signature: Nothing

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width