3

Will practising programs like "print star pyramid" help in any way??

Comments
  • 3
    Depends on if you do it in a smart or a stupid way.
  • 1
    Depends on if you are a complete beginner or do this after 2 years of expertise
  • 1
    @BigBoo yeah right but there are not many ways to do that same thing aside from using loops or recursion.
    My college seems to be much more interested in using these kinds of things than actually teaching to solve any real world problems.

    I actually liked C very much but lost interest in it as soon as I started printing some fucking pyramids and shit.
  • 0
    @ruhe Im no beginner, that's what got me thinking I could not possibly found a place where I could use these pyramids.
  • 1
    @makarand You can always do something more complicated. If you're out of ideas you can go to project Euler and do solve some math problems.
  • 2
    @makarand When I held a beginners course for Java, printing Pyramids really came in handy as you won't believe how hard it is for some people to understand for-loops. I don't think anyone who programs for longer than 10 days should have to practise on that, of course
  • 3
    @makarand for a novis any problem solving can help.

    But even for a more experienced it can be an opportunity to try to solve it in a completely different fashion.

    Like trying functional programming or some other way you have little or no experience with.
  • 1
    @Voxera that's a great point!
    Try it in assembler,
    try it with Arduino and electronics,
    try it in VHDL,
    try it in SQL.
    I'm sure that there will always be something you have learned afterwards
  • 1
    I personally like to go back to simple data structures like the Tree structure, I then take everything thing I've learned about a language and try and make the cleanest version of the structure I can, targeting efficiency and / or flexibility. You would be amazed at how much thought you can put into simple things, and I think they help because it allows you to improve your skills while using a clearly defined project with a relatively simple scope. If you try and apply the same principle to Large projects, it can be overwhelming but taking what you learn from the simple projects and then building a large one with it becomes much easier. I prefer data structures over random pyramids etc because they are actually used all over the place.
  • 0
    @makarand
    In response to your reply to @BigBoo I completely understand what you're saying, I used to feel this way when I was in university.

    What/how they are teaching is not necessarily a bad thing. It's programming techniques. It'll give you the tools to handle larger and larger problems.

    Plus, they don't know what you'll be working on or where. So they teach you generic "Computer Science".

    Specialization is then up to you. Want to make a website or an app? Research, follow tutorials, build one yourself.

    This would be after you know how to do everything the programming book used in class. I wouldn't recommend it if you're still learning the language.

    Additionally, building real world programs takes more than knowing a programming language. And big projects usually requires a team.
  • 0
    @ODXT thanks for such a great advice.
    I think the post clearly reflects that I'm a beginner, but I'm not.
    I am an Android and react developer.
    I think I should have mentioned it in the post, my bad. I did work on an social media application, real time vehicle tracking, a messenger etc. but my real concern is so far I haven't came across a problem where I needed to do something like print stars in some specific order and such things to solve it.
  • 0
    @RyanWig will check it out, thanks!
  • 0
    @RyanWig After having implemented the Mandelbrot set in both Java and JavaScript (I created https://mandelbrot.neocities.org some years ago), I am pretty much done with that😂 but thanks for all the information
  • 1
    @makarand printing start by it self is probably not very useful and not every exercise will be useful but thinking on different ways to calculate things can be useful in some other respect.

    Its more about how you solve it and how you think about it that is important.
  • 1
    hey, you never know, some day the fate of the entire world might be dependant on your fizzbuzz program. ;s
  • 1
    Any practice can help, but problems like these come with the added burden of being so monumentally stupid and boring that they scare or bore the learner away before they learn anything.

    The ideal way is to build something small that you'll actually use.
Add Comment