tlhIn`toq's Profile User Rating: ****-

Reputation: 5859 Overlord
Group:
Mentors
Active Posts:
13,005 (7.3 per day)
Joined:
02-June 10
Profile Views:
111,518
Last Active:
User is offline Today, 04:05 AM
Currently:
Offline

Previous Fields

Country:
US
OS Preference:
Mac
Favorite Browser:
Safari
Favorite Processor:
Who Cares
Favorite Gaming Platform:
Who Cares
Your Car:
Dodge
Dream Kudos:
600
Expert In:
C#
Icon   tlhIn`toq There are very few software issues that liberal application of Mt.Dew and M&Ms wont fix!

Posts I've Made

  1. In Topic: Developer Charging for Source Code

    Posted 19 Apr 2015

    Quote

    I am going to take the pragmatic path here and pay for the source code, get it checked and then continue on with the development of my enterprise.


    The guy has proven himself to be untrustworthy. If I were you I'd go through a 3rd party escrow service. After all I'm sure its not a small amount of money. You put the money into an escrow account; he provides the code; you have it confirmed; then the money is released to the putz developer.
  2. In Topic: Developer Charging for Source Code

    Posted 18 Apr 2015

    People like that make all the rest of us look bad. I'm sorry its happening to you. But as others have said, there's little you can do about it now except pay the blackmailer and move on.

    Please also learn from it. This one guy doesn't represent all developers. Personally I think he sounds like a short-sighted ass. He'd rather screw you for an extra 20%, where anyone honest would rather give you a good experience in the hopes of getting another contract from you.

    Next time make sure getting the source code is part of the contract. Right now I'm working on a contract where I supply them an executable at each milestone (feature a, b,c from the contract). When they run the executable, check for bugs and behavior etc. and confirm its what they wanted I get a milestone payment and they get the source code. This way they get their code that they're paying for at each major update. If I had a heart attack today they'd still have their code to this point.
  3. In Topic: Windows store app - get select gridview item properties

    Posted 17 Apr 2015

    There is a big problem with the underlying design of the program. I'd bet that once you clean up the design, the problem you are seeing will be fixed as a side affect.

    The problem you have here is that you are directly adding to the GUI control, not using proper binding to a property in the code behind the window.

    SPecifically I'm referring to this line:
    14                    grdPoster.Items.Add(img);
    

    You should just never being doing this. Instead you should be setting the .ItemsSource to an ObservableCollection<Image> dependency property in the C#.

    There are a couple tutorials on "WPF for the WinForms developer" linked in my signature block. They should help you get a better handing on building WPF applications correctly.

    FYI: I think the look of the app is really nice. But I have to wonder about the underlying design. I would expect you to be filling the grid with OBJECTS not images. The control template would define what to show of that object, namely the poster Image. All the .Height, .Width, .Stretch etc. should also be defined in the XAML, not hard set in the C#.

    Are you using any kind of Object/Relational Mapper such as Entity Framework or LLBLgen? It would make your work 100% easier if you only dealt with C# objects and let the ORM deal with the database interaction. In other words, you really don't have to write all the database stuff if you use an ORM. Again, that's part of the underlying design that I fear wasn't considered before building the UI.
  4. In Topic: Displaying Dead Mouse on Click- Game

    Posted 17 Apr 2015

    Before working on advanced features I would suggest you work on basic good practices.

    Looking at your code you have some bad practices in play that need your immediate attention.
    These will form bad habits quickly and should be worked on. This is part of what I mean by "learn foundation concepts first".

    Problem 1: Use of GUI controls as your variables.
    You have numerous places where you are doing things like: SomeMethodCall(TextBox43.Text);
    Your textboxes and other GUI elements are not meant to be your variables to hold values. They exist only to be a way for the user to interact with the data held in the logic code *behind* the GUI. You should have properties bound to the GUI. When the user changes something in a textbox it updates the property in your code. When the property gets a new value, the GUI is updated. But your logic always uses the property not the GUI element.
    There is a tutorial on properties linked in my signature block.

    Problem 2: This bit about button1 and textbox14 is just horrible. If you are working in old 1980's WinForms for Win98 and WinXP programs then name your control as soon as you make it before doing anything else with it. txtbxFirstName is so much easier to maintain than textbox32. Same with "frmConnectionSettings" instead of "form2" or "wndCustomerDetails" than "window4". If you are making programs for current OSes like Win7/8 then you should be working in WPF where the controls don't need to be named 90% of the time, but the same practice of giving meaningful names should still be followed in the few cases where they are needed.

    Problem 3: Don't put meaningful operational code in GUI control handlers. You have a lot of places where the work is being done in the button event handler instead if in a dedicated method. Instead you want that handler to just direct action to the first methods, not actually perform the actions.
    btnSave_Click(object sender, eventargs e)
    {
       SaveSettings(); // Call the save method
       SavePlayers();
       SaveWindowGeometry();
       // Do NOT put all the save code here
    }
    

    This way you can call the same save methods independently from code without having to either duplicate code (evil practice) or without calling the button handler. If you are using WinForms then you have a .Click event handler. If you are writting in WPF then don't call the .Click event but instead create Commands and activate those. The .Click handler in WPF is kind of a carry-over to give WinForms coders a comfortable migration path but is not considered the way a modern profession WPF coder works.

    Problem 4:
    Eye sore code.
    Take the extra 2 minutes to clean up your code to make it easy to read, easy to follow, and most important, easy to manage.
    • Kill all those dead blank lines at the ends of methods.
    • Wrap groups of methods that go together in #region blocks so you can find all your sending code and receiving code easily for example.
    • Get your lines aligned. Control-K, Control-D will do that for you (Think of it as Klean Document)


    Problem 5: Decent naming
    Methods like private void ClientSession(object sender, eventargs e); don't follow established naming style guides.
    A method performs an action. By convention for decades methods are named as verbs to show what they do. Nouns like ClientSession would be presumed to be a property by any other coder looking at your code. private void CreateClientSession(object sender, eventargs e); on the other hand shows that it does something (a method) not that it is something (a variable).

    Problem 6: Use of WinForms after the year 2001.
    If this is school homework and you are instructed to use WinForms then keep going. If you are teaching yourself then stop using this 1995 WinForms crap and move to modern WPF. WinForms is legacy/end-of-life. Look at Monster.com and CareerBuilder.com and you'll see that employers want WPF skilled developers. Learning this old-school stuff does nothing for your career or potential to get hired.

    Problem 7: Trying to run before you can crawl.
    You're not at a point in your self-education where you should be trying to archetect/design an entire program from scratch. Its a common misstep that rookies make. Somehow they think "I don't know how to code so I'll make a program from scratch to learn." That never turns out well. You have to undertand the coding language you've chosen, its strength and weaknesses and most importantly its foundation design concepts before you can even think about trying to design a program.

    Looking at your code its very clear that C# is new to you... GUI programming is new for you... That you don't understand the idea of using properties instead of using your WinForm controls like they are variables. That you don't even realize that by using WinForms you've chosen a dieing GUI technology that hasn't been in employer demand for years. That you haven't worked through some of the most basic debugging tutorials which would give you some skills to solve really basic problems.

    I strongly urge you to set this project aside, pick up one or two "Learn C# in 30 days" books and just work them from cover to cover. They are guided tutorials not reference books like a dictionary; only to be opened when you get in trouble. So many bad things I see here would be taken care of if you would just work on learning at this stage and leave the designing until you are more ready. I think if you then look at this same project with all the new knowledge you'll pick up you'll see where I'm coming from.

    I'm not going to go into a long critique of your code. And I don't want you to feel like I'm just out to pick on you. I'm just pointing out a couple of many foundation concepts you didn't pickup up in the early stages of learning C#. You can't leap-frog the learning process by trying to build a program in your first month. Nobody can. Its not just you. Nobody in the first month of a new discipline has enough knowledge to jump in and start designing finished solutions: Not carpentry, not automotive design, not software engineering. C# is a foreign language with its own syntax. You aren't going to say "I know no Russian. I'm going to write a Russian mystery novel as my vehicle to learn the language." Same here with programming.
  5. In Topic: Want to learn C#

    Posted 17 Apr 2015

    We have a number of tutorials in the C# Tutorials section. But if you're starting completely from day 1 you want to follow a single approach. Jumping from YouTube video to a tutorial to a different site... Just makes for a very disjointed approach. In the beginning follow one consistent voice.

    Pick up a "Learn C# in 30 days" type book. Work it from cover to cover. Don't worry about trying to design any of your own projects from scratch. You can't architect a house on your first day of design school. Same goes for programs. You have to learn the language and more importantly the concepts of coding and the foundation principals of program design. For some reason it is a very common path rookies take: "I don't know much about the language and even less about the underlying foundation concepts, so I'll architect a complete program and code it - as a way to learn." The problem is they generally don't know enough about design/architecture to be able to plan how the program works.

    This is akin to saying "I don't know anything about cars. I'm going to order a bunch of random parts and sheet metal then build a car, as a way to learn about auto mechanics." They then start with UI because that's easy drag and drop, when in reality UI is the last thing you do after getting all the underlying logic working. So in our car metaphore they build the dashboard before engine. Later they write a question here asking

    Rookie said:

    "My dashboard is done, but it doesn't work right, the speedometer shows -40mph, none of the lights go on, and is missing gauges I need but I can't figure out how or where to add them. I've Googled 'backwards speedometer' but couldn't find a tutorial I could copy/paste from for my exact situation. I also built the doors, but they are 5 inches taller than the chassis and the hinges don't line up. I don't understand how an internal combustion engine works, but I've cobbled together some parts that I found in a catalog however there's no place for the air filter to go. What should I do now?"

    Yes that's funny. But a couple dozen rookies a month ask coding questions here that are just as much a case of doing the last thing first and just groping around in the dark hoping to stumble across an understanding of coding.

    The head of the C# forum has a dozen or more book references pinned. Work a few "Learn C# in 30 days" books FROM COVER TO COVER. Do every assigning and project in them. THEN look at that project ideas topic that is pinned. Build every project in that topic. If you can't whack those out with ease you are not ready to try designing your own software yet.

    Be patient and learn before you try doing. You didn't just jump into a race car on your first day of driver education. You have to learn the basics as a solid foundation to build upon.

    Tutorials I recommend:

My Information

Member Title:
Please show what you have already tried when asking a question.
Age:
Age Unknown
Birthday:
Birthday Unknown
Gender:
Location:
United States of America
Interests:
C#, Photography, Camping/Hiking, Travel
Years Programming:
10
Programming Languages:
C#, WPF, MVVM

Contact Information

E-mail:
Click here to e-mail me
Website URL:
Website URL  http://www.stlaurent.me
Yahoo:
Yahoo  pk_clint@yahoo.com.au

Comments

Page 1 of 1
  1. Photo

    tlhIn`toq Icon

    19 Aug 2013 - 20:28
    Ah - I *am* blind.
  2. Photo

    Michael26 Icon

    19 Aug 2013 - 15:53
    Yes there is, you have Awards, About me, Posts and Blog. That is right under your status.
  3. Photo

    tlhIn`toq Icon

    18 Aug 2013 - 10:16
    Am I just blind, or is there no link on a person's profile page to their blog? That's silly.
    http://www.dreamincode.net/forums/blog/1888-tlhintoqs-blog/
  4. Photo

    tlhIn`toq Icon

    18 Aug 2013 - 10:13
    Yep. They are coding on a "Whole 'nother level" above my last employer. Makes me feel like like I'm in the special slow learners group. But that's a nice side effect of new environments: They make you stretch past your comfort zone and learn new techniques.
  5. Photo

    Michael26 Icon

    05 Aug 2013 - 06:17
    At least you found job :)
  6. Photo

    tlhIn`toq Icon

    04 Aug 2013 - 12:53
    01aug13: I've changed employers and no longer working at home. So I won't be answering posts in real-time through out the work day. Don't take this as disinterest in the site. Its just I can't do that from a new office as a new employee. So its nights and weekends for me.
  7. Photo

    tlhIn`toq Icon

    12 Jul 2013 - 06:55
    Thanks! I've only just gotten on the computer this morning and saw it myself.
  8. Photo

    Michael26 Icon

    12 Jul 2013 - 06:39
    Congrats on 5000 :)
  9. Photo

    tlhIn`toq Icon

    05 Jun 2013 - 11:15
    I need to run through them and clean them up, stitch panoramas together etc. Shot about 700 frames. I'll keep maybe 50 at most. 10% or little less is about average.
  10. Photo

    Michael26 Icon

    05 Jun 2013 - 10:28
    Post some pictures, will you?
  11. Photo

    tlhIn`toq Icon

    05 Jun 2013 - 09:20
    Back from vacation. I was away for nearly a month (if anyone noticed). But Alaska was beautiful.
  12. Photo

    tlhIn`toq Icon

    31 Dec 2012 - 08:56
    Thanks! I see the voting is closed.
    http://www.dreamincode.net/forums/topic/303317-dic-community-awards-2012-voting/
    I had to laugh when I saw I was even on the "nicest member" list - Everyone knows I'm the brutally honest old man LOL.
  13. Photo

    lucky3 Icon

    31 Dec 2012 - 02:28
    Congratulations for the "Most Helpful- Programming" shared 1st place award!
Page 1 of 1