Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

madknight3

Member
  • Content Count

    1,786
  • Joined

  • Last visited

Reputation Activity

  1. Like
    madknight3 got a reaction from Ziggs in Short version of if statments Python 3.x   
    You can use a loop
    for w in word: if (check == w): print(check) else: print("_")
  2. Like
    madknight3 got a reaction from Milkshak3 in Short version of if statments Python 3.x   
    You can use a loop
    for w in word: if (check == w): print(check) else: print("_")
  3. Like
    madknight3 reacted to trunk_port in Super frustrated trying to learn C++ coming from Java.   
    I think it would make more sense to talk to the professor about it. If he/she knew you were transferring from another school, I don't understand why they would give you a 50 for the wrong language if they didn't explain that before.
  4. Like
    madknight3 reacted to Brenz in Making python 3.2.5 more economical?   
    NEVER do this. The number of lines should never be a factor in how good your code is.
     
    Code formatting is there for you and anyone else who looks at your code, it makes very little difference to the computer. The harder you make your code to read the longer it will take to understand it and to fix any bugs not forgetting it goes against every code standard ever written.
  5. Like
    madknight3 got a reaction from alex_read in Java program   
    If you're considering IDE's like Eclipse then IntelliJ is worth a look as well (it's what I and many people prefer for Java). There's a free community edition and a paid ultimate edition (which students can get for free).
     
     
     
    If your school uses Dr. Java then you'll probably just want to use that for now and move on to something better when the class is over if you're still working with Java.
     
     
     
    If you want extra resources for helping you learn Java on your own time then these might help
     
    Java Tutorial For Complete Beginners is a frequently recommend video course.
    Head First Java is a frequently recommended beginner book.
    Tutorials Point can be a useful reference.
  6. Like
    madknight3 got a reaction from fizzlesticks in Binary Search Help   
    Are you sure? The questions states "Assume that we are using the binary search algorithm shown in lecture and section." so there should be something. Maybe you missed it or simply don't remember it being shown to you. Reviewing your notes/textbook or asking someone in your class might help. If that fails to resolve the matter then talk to your teacher.
     
    It's also possible that it's hasn't been covered in class yet and will be covered before the assignments due date. I've had this happen in classes before although I wouldn't take a chance.
  7. Like
    madknight3 got a reaction from alex_read in Why is Java so much harder to learn?   
    Learning to program in any language can be difficult but that doesn't mean you won't get it with some time and effort. Java is far from impossible to learn as your first language so stick with it.
     
    If you find it hard to learn from the class lectures alone, then perhaps you can use other resources to help. There are so many tutorials (both written and video) and books for teaching beginners Java.
     
    Java Tutorial For Complete Beginners is a frequently recommend video course.
    Head First Java is a frequently recommended beginner book.
    Tutorials Point can be a useful reference.
     
    We're also here to help when you get stuck on something.
  8. Like
  9. Like
    madknight3 got a reaction from mynameajeff in Interesting CompSci project. "Make the most stupid Program in the stupidest language"   
    Eh, it's not that bad.
  10. Like
    madknight3 got a reaction from LukeTim in Windows vs. Console   
    If you mean the C# Fundamentals for Absolute Beginners course, then by the time you've gone through it all you'll have gone through a small introduction to WPF. After completing the course, you'll have a basic understanding of C# and a small taste of WPF so you should be ready to move on to something more specific to WPF.
     
    I've never looked up tutorials on how to do WPF development so I can't recommend anything specific but I find that Pluralsight usually has decent courses when it comes to topics in .NET development. Here is one option, and another option, for beginner WPF tutorials. They also include more advanced courses for you to continue with after the beginner ones.
     
    Pluralsight is a paid site but you can get a free subscription with the free Visual Studio Dev Essentials program. While your at it, install a copy of Visual Studio 2015 Community (it's free) if you haven't already done so. It's better than the Express edition you may have installed from the Microsoft Academy course.
     
    That should get you started. Also, don't forget to practice on your own too. Create and work on your own projects. Do something different than what the tutorial is doing. Following tutorials can be very helpful to guide you through new material, but when you're following along with code someone else is writing instead of writing it from scratch yourself, it can be easy to think you're learning more than you really are. So practice, a lot.
  11. Like
    madknight3 got a reaction from lubblig in .Net Library for Hangman   
    My recommendation, as others have said, is to grab a word list dictionary from somewhere and load it into an array, or other data structure, at run time.
     
    But if you really want it as part of your class file, then write a separate program which takes said word list and formats it into an array so you can copy/paste it into a class file. You can even have the program create the whole class file if you want.
  12. Like
    madknight3 reacted to lubblig in .Net Library for Hangman   
    I think what madknight3 is trying to say is that he would like a code example of the class you're talking about with just a few words as an example. It doesn't matter what words, just so that he can, in a technical way, see what you're trying to accomplish when you say that you want words in a class. So again, a code example of this class you want. What words you use in the example are irrelevant.
     
    At least I think so.
  13. Like
    madknight3 reacted to fizzlesticks in Advent Of Code - 25 challenges for December   
    Pretty easy but there is no part 2, it just gives you a free star.
  14. Like
    madknight3 reacted to fizzlesticks in Advent Of Code - 25 challenges for December   
    Got me all 50 stars or I guess I should say 49, the last day was a bit disappointing.
  15. Like
    madknight3 got a reaction from MisterWhite in Advent Of Code - 25 challenges for December   
    Here's one way to do it.
  16. Like
    madknight3 reacted to Nuluvius in Dx11 or Dx12?   
    If you have no time pressure and as you mentioned 'just want to try it out' then why go for the older technology? We generally don't/shouldn't do this as developers. It's the same argument as it is for Swift vs Objective C. Yes there's more documentation and libraries for the older of the two but why hang about and learn the methodologies and intricacies of an aging and/or obsoleting platform when there's no good reason to (as is the case in your situation).
     
    It would be a different argument entirely if you had to pump something out rapidly that perhaps required the use of some kind of already well established third party API but it's not.
     
    Sorry but this kind of 'well it's new and different therefore potentially more difficult so lets be lazy and stick with the old' argument really irritates me on several levels. Just go and get stuck into the detail and take ownership of the knowledge yourself...
  17. Like
    madknight3 got a reaction from babadoctor in Encode "kek" into binary, hex, base64, and rot13 over and over   
    Most languages have libraries that can do it for you. Just apply the functions in the desired order.
     
    Still not sure why you want to do this though. It's not like it's very secure or anything. Proper cryptographical algorithms are strong even when the attacker knows the method of hashing/encryption used. As soon as your method is discovered, it can be reversed for the original text.
  18. Like
    madknight3 reacted to Nineshadow in Advent Of Code - 25 challenges for December   
    Ok guys , I've decided I should probably use a language I'm not as familiar with for these challenges. After all , they should be challenging , ey? Ah , who am I kidding. They got difficult enough down the road. Still , I've solved them in my trusy C++.
     
    So...I'm doing it with...
    Brainfuck!
    Ok no , that is probably a really bad idea.
    Chef?
    No.
     
    Ok , I'll stop with the jokes. I'll start doing these in Python. Let's see how it turns out. I know how it works , I've just never really used it.
  19. Like
    madknight3 got a reaction from UL_42L in Advent Of Code - 25 challenges for December   
    I see, I thought you counted everything out yourself. That's certainly more efficient lol
  20. Like
    madknight3 got a reaction from LtStaffel in Putting a Limit On Output in Python   
    permutations can take a parameter 'r'. to specify the length of the resulting output. If it's not supplied, or if you supply r=None, then it defaults to the length of the input.
    input = ...length = 2for p in permutations(input, r=length): # Do something Example
  21. Like
    madknight3 got a reaction from TheGosuStandard in Beginners, please learn to debug your programs   
    Note: This isn't directed towards you if you're a complete beginner who has never started coding yet. Once you get started though, it wont be long before this information is relevant to you so come back after you can start making your own simple programs.
     
    Introduction
     
    We get a lot of topics here where someone posts their code that wont work and is (politely) asking us to fix it. Commonly they wont give us any extra information about the problem. Maybe you've done this yourself or were going to. Please read on.
     
    It's great that there are people on these forums willing to help you out even if you don't do any debugging. However, it's to everyone's benefit, especially your own, if you start learning how to pinpoint and solve your issues yourself. This doesn't mean you'll be able to solve all your own problems, and we're still here for you, but at the very least you'll learn how to provide more information when asking for help.
     
    A large part of programming is writing fresh new code to accomplish a task. Another large part of programming is figuring out why the code you, or someone else, wrote isn't working correctly. This process of identifying and removing errors is known as debugging. Every programmer should start learning to debug early because it's so helpful regardless of your skill level. So after you've went through a few tutorials and learned how to run some simple programs, it's a good time to jump into debugging.
     
    There are 2 places where you can start debugging:
    Using print statements Using a debugging tool In the future it will be useful to get into formal testing but don't worry about that at this stage.
     
    Using Print Statements
     
    Sometimes, no matter how advanced you are, all you need is a quick print statement to solve your issue. And it's a good place for beginners to start because they don't need to learn anything new. You may have already been doing this without knowing what the word "debugging" is and if so, great.
     
    All you need to do is to put print statements in your code that provide you with useful information. There are far too many languages where each language may have multiple options for printing so obviously I can't list them all, but you'll usually learn one way of doing it in your first couple tutorials. Many tutorials start you out with the traditional "Hello World" example so in many cases you learn how to output text to the screen in lesson 1. Here are some examples.
    // JavaSystem.Out.Println("...");// Python 2.7.xprint "..."// Python 3.xprint("...")// C#/VB.NETConsole.WriteLine("...");// Cprintf("...");// C++cout << "...";// PHPecho "...";// etc The point of using print statements for debugging is to help figure out what is actually going on when you run your code. What is in that variable? What does that function return? Did I get the correct input from the user? Does the code enter the if block or the else block? What is happening in that loop? etc
     
    It's a very simple method of debugging but it can still lead you towards your solution.
     
    Using a debugging tool
     
    Debugging tools offer many features and is a lot more useful than print statements in most cases. Essential, you get to pause your program at any line of code while it's running. While it's paused, you can have a look around at things like what value a variable currently holds. You can step through a program line by line, pausing at each line to make sure things are happening correctly or you can stop at only the specific lines you want. Sounds useful right? It'll take a little more work to learn how to use these tools, but once you do it'll make your coding life easier.
     
    If you are using an IDE, like Visual Studio, Eclipse, IntelliJ, Code::Blocks, etc, then they will have a built in debugging tool. If you prefer text editors like Notepad++, Sublime Text 2, etc, they may have a debugging tool, perhaps through an extension, but if not you may be able to download a standalone option. For example GDB is a standalone command line debugger commonly used with C. Many browsers also have developer tools that have debuggers. For example you can debug Javascript inside Chrome and Firefox. 
     
    The best way to learn to use these tools is to look for tutorials for the specific debugger that you use. It's also more likely to be in the language you're using which might make it easier for you to follow. Many debuggers are very similar though so if you learn to use one in say Visual Studio, you can probably then figure out how to use one in another IDE like IntelliJ.
     
    Here are some debugger tutorials for reference but feel free to go out and find your own.
    Visual Studio (1) Code::Blocks (1) Eclipse (1) GDB (1) Chrome (1) If anyone wants to help me add to this list, contact me and I'll add it in. Being an IDE guy, I'm not familiar with many options in the text editor/standalone areas.
     
    Conclusion
     
    So now that you know you should be debugging, when you run into a problem with your code then give it a try. It's perfectly fine if you can't solve your problem yet, we are still here to help. It's the trying and information gathering that will help you learn and become a better programmer. Treat each error as an opportunity to learn something new.
     
    So now that you're more informed, here are the things to post when requesting help:
    Purpose - What is the code supposed to accomplish? Code - The code itself (remember to use these forums [ code ] tags) Error - What is the error message you are receiving when trying to build or run your program? Line of Error - What line is the error message pointing at? Any additional information you think might be useful that you found while debugging. With debugging, even if you can't solve something yourself, you might find that your question becomes more narrow. You'll no longer be asking "Why doesn't my program work?" but instead asking more specific questions.
     
    And even if you're just stuck on the "I can't even get my program to run so I can't debug it" problem, you can still post the first 4 points I mentioned and someone can better help you get things up and running.
     
     
    If you have any questions/comments post below or send me a private message. Happy Coding!
  22. Like
    madknight3 got a reaction from h3rm3s in How to ask to right amount of money for a website?   
    Research. There's a lot of advice out there for freelance web developers (most likely by professionals). Google and read, then do it some more.
     
    After you do some research, if you still have questions that you can't find answers to, seek out and talk to professionals who do what you are trying to do. Anyone else is probably just guessing with the advice they give. It doesn't mean they're wrong, but they aren't the people I would want to hear from. I'm sure some of them frequent places like r/web_design, the workplace stackexchange, etc so ask around.
     
    Many people have personal blogs, twitter, and what not these days so you might even be able to personally get in contact with some of them (though don't take it the wrong way if they don't ever respond).
  23. Like
    madknight3 reacted to Enderman in How to ask to right amount of money for a website?   
    why would they pay you to make one in the first place when they can just use squarespace??
     
    Now with the offer code LINUS get 10% off your first order!!!

  24. Like
    madknight3 reacted to ONOTech in Advent Of Code - 25 challenges for December   
    Just tried Day 1. Simple.
     
    I'll catch up to day 9 this weekend.
  25. Like
    madknight3 got a reaction from ONOTech in Advent Of Code - 25 challenges for December   
    Check out Advent Of Code if you're interested in getting a daily coding challenge from December 1st to December 25th. Found out about this here and thought it looked fun. It pairs great with the other advent calendars out there that provide you with food/beverage!
     
    The first problem is available and is simple enough for beginners. Any programming language is allowed.
     
    Feel free to use this thread to discuss the problems, ask for help, show off your solutions, etc.
×