• Breaking News

    Saturday, August 18, 2018

    Warning! Coding chess is deceptively hard, but very rewarding. learn programming

    Warning! Coding chess is deceptively hard, but very rewarding. learn programming


    Warning! Coding chess is deceptively hard, but very rewarding.

    Posted: 17 Aug 2018 03:38 PM PDT

    A while ago, procrastinating revising for some very important exams, I decided to start a learning project. Chess. It's a game I've known since I was young, and is turn based. How hard could it be!

    Turns out, very. I went through several iterations, building layer by layer, adding features, building bugs and complex dependencies, just overall 'spaghetti code'. I got quite far but eventually my poor practice caught up with me. I've since deleted everything, and started again.

    Why am I saying this? Because, despite hours of frustration, and right now, jack all to show for it, it's been an incredibly rewarding experience, and although it's not for the faint of heart, I highly recommend it. I'm far from a perfect programmer, hell I'm far from a competent one, but embarking on a project such as this one not only has introduced me to new concepts like OOP and the importance of making separate modules, but also provided insights into organising your code and documenting in a way so you know what's going on. It's a surprisingly complex game, with multiple ways of solving problems, from if else statements to clever tricks to reduce lines, so not only does it reward you on the first attempt, but it also keeps on rewarding you if you try to make it more efficient, both in terms of lines written and computer power required. And if get past the engine part, you can even start to look into some really interesting stuff thinking about AI, min maxing and possibility trees. It's a gift that keeps on giving, and even though I've only scratched the surface, I highly, highly recommend it as a project to anyone learning coding that wants something to do.

    TL;DR: Try learning chess, you'll learn a lot.

    submitted by /u/l5rk
    [link] [comments]

    Any good tutorials that walk you through large-scale projects?

    Posted: 17 Aug 2018 01:59 PM PDT

    I've been learning programming for almost a year now and I feel like I have a generally good grasp on a lot of things, but when it comes to coming up with and creating larger projects I struggle. I feel like it would be helpful to watch someone complete a project from start to finish do you guys know of any good ones, preferablely in Java or C++?

    submitted by /u/ExternalBag
    [link] [comments]

    The Forgotten Resource - Your Local Library

    Posted: 17 Aug 2018 07:26 PM PDT

    I remember seeing this tip in an AskReddit or LPT thread about being homeless and using the free resources available to American Citizens and thought I'd share. The post shared the fact that most public libraries have an abundance of modern resources to help people, but people aren't aware of them because no one goes to the library anymore.

    After losing my job in February, I remembered that post and browsed to my library's website. I looked around the site, signed up for a free library card and started looking through the Resources and Digital Branch. As it turns out, you can view all the videos and download all of the Example Files from LinkedIn Learning for free by using your library card number through Lynda.com.

    There's a wealth of videos on the site about everything from drawing to business to programming. I've since used these videos to build on my existing knowledge of Excel and transition from writing VBA to JavaScript. I am still stumbling through the process of building my first second website on GitHub and started a project to emulate an HR department's Applicant Tracking Software, except for job-seekers.

    The project is inspired by Charlie Day's Jobbie rant from It's Always Sunny in Philadelphia and the goal is to standardize your online profiles between different websites (LinkedIn, Indeed, Glassdoor etc.). I just started the project Job-Land and haven't made a lot of progress, but it's my first real delve into web development and I'm excited about it.

    Anyway, I just thought I would recommend looking into your own local library's website to see what free resources are available for you to learn programming. Feel free to comment, contribute and critique to either repo if you would like!

    submitted by /u/AdderallandAnxiety
    [link] [comments]

    Ways to practice without a computer

    Posted: 17 Aug 2018 11:59 PM PDT

    Hey guys, the title pretty much says it. My laptop decided to give me a permanent black screen and I can really afford to get a new one at the moment. Do y'all know a way to practice or keep progress going when you're unable to actually apply anything?

    Side question: what are the things I should look for in the new laptop in terms of hardware? I'm still learning everything, so I'm not familiar with all the numbers and brands and what's good or effective for what.

    submitted by /u/Rook37
    [link] [comments]

    Want to learn Python and HTML, where do I start?

    Posted: 17 Aug 2018 07:50 PM PDT

    I took programming this year but the programming teacher didn't really know any programming and shoved a bunch of internet projects at us lol.

    Anyways, I genuinely want to self learn python and HTML. Does anyone know any free resources that are helpful?

    submitted by /u/KawaiiSnail
    [link] [comments]

    Bootstrap/css/html tutorial up now! Build a web document managmnet system from scratch

    Posted: 17 Aug 2018 09:10 PM PDT

    Hey guys,

    I'm continuing my series on how to build a web document management system. Hopefully you learn something new and I can continue to give back to the community!

    https://youtu.be/o33K1hlNV9g

    submitted by /u/fefe_doc
    [link] [comments]

    Why C++ std library is undocumented?

    Posted: 18 Aug 2018 12:25 AM PDT

    I am used to programming in C# and now I am learning C++, I am bit struggling understanding the standard library functions. In C# every method is documented, and when you want to use it, Visual Studio displays the description of that method, however in C++ I have never ever seen a function that was documented. The only thing that IDE displays is the signature of the function you're trying to use, but no description what so ever. The best I have seen in C++ are inline comments inside the source code, but those comments do not get picked up by IDE and displayed once you're using the function.

    Why is that?

    submitted by /u/jjfawkes
    [link] [comments]

    Want to make a programming language

    Posted: 17 Aug 2018 08:39 PM PDT

    I want to create my own programming language using either C or C++. After searching online all I have found are tutorials in Python or Java. I'm looking for a book, a youtube tutorial series, a pdf, anything. Any suggestions would be appreciated.

    submitted by /u/heafBot
    [link] [comments]

    What license to use?

    Posted: 18 Aug 2018 12:11 AM PDT

    I'm really not sure if this is the right subreddit, but /r/programming seems to be entirely links to news articles, same with /r/opensource and /r/opensourcedev seems pretty empty.

    I have been developing software for years, both professionally and personally. My personal projects were almost all released under GPLv2, and occasionally public domain. A while ago, I switched from using GPLv2 to the MIT License, as I really liked its clarity and succinctness. But there is one problem with the MIT License: it doesn't mandate source code release when repackaged into a new binary.

    The Mozilla Public License does rectify this, and I've switched to it on one project, but I do not like that it has an express grant of patent rights from contributors. If the MIT License had a "disclose source" clause added, it would be perfect.

    Does anyone know of a license that satisfies these conditions? I do like the GNU LGPLv2.1, but it doesn't check all the boxes I want. I definitely prefer weak copyleft, a license that either explicitly doesn't grant patent rights or which says nothing about it, that doesn't force enhanced attribution ("badgeware"), and ideally has a no promotion clause (can't use my name to promote your version of the software).

    As far as I can tell, no such license meets these criteria. The Common Public License comes close, but it does grant patent rights, and it specifies jurisdiction of New York, which is a bit odd; it is also listed as "superceded". The Adaptive Public License is almost perfect, but it specifies enhanced attribution which I think is annoying; plus it's very long and suffers from legal-itis.

    Anyone have any recommendations? Is it possible to modify the MIT License without breaking it legally?

    submitted by /u/MrAureliusR
    [link] [comments]

    Is it okay to watch and learn ?

    Posted: 18 Aug 2018 12:10 AM PDT

    Hi,

    I started learning python 2 days ago.I was wondering if its okay to code while watching the tutorial on lynda i use finished exercise files to debug my start exercise files i just change the values in it.Will i go further if i learn like that ?

    If its asked before comment down the link.

    Thanks

    submitted by /u/huskyhunter24
    [link] [comments]

    Programming from Scratch

    Posted: 17 Aug 2018 11:39 PM PDT

    Hello All!

    I am novice in programming and the issue i am facing is i can't write code from scratch without the help of google and stackoverflow, i can't even write a small pseudo code for a particular task am trying to achieve. I always a need a already written code for somewhat similar task i am looking to write. Once i get that snippet i am able to easily make changes to that code(although it takes a lot more of googling) and get my work done. What i want to learn is, given a task to automate i need to be able to at least write a basic code snippet for it. Any suggestions or advises are really appreciated

    Thanks

    submitted by /u/security_prince
    [link] [comments]

    x86 Assembly Language Questions

    Posted: 17 Aug 2018 10:51 PM PDT

    Hello everyone! The following questions are based on the language in the title. (I'm quite new to this language, so bear with me)

    1. In one of my notes from college, it states that you cannot perform the following:

    MOV CS, BX

    Why?

    1. Can someone explain the usage of LEA to me, and why do we need it to display strings? Probably in a more easy-to-understand way?

    And is anyone willing to pm regarding assembly language? I would really like to learn how to write assembly, especially before my assignment and finals are due.

    submitted by /u/HyRanity
    [link] [comments]

    Digital executive with an old web design background wants to get into full on programming

    Posted: 17 Aug 2018 06:53 PM PDT

    I'm a digital/IT exec for a large company with a front end web background.

    I'd like to learn full stack development and am seeking recommendations on what platforms are right. I like syntax and logic building something like codeacademy provides, but I feel like it's lacking exercises like standing up environments and having code mesh up between applications.

    Is there an online course out there for a person like myself that is reasonably technical but wants to a become proficient dev?

    Experience: I can reason through existing code, edit and hack it to work. I can't stand up an app from scratch

    submitted by /u/hatefist
    [link] [comments]

    Processing mp4 frames ? Need some advice.

    Posted: 17 Aug 2018 10:15 PM PDT

    Hey guys, In the next few weeks I'm going to write a program to do image processing on each frame of an mp4 video - then render it back.

    I'm a novice coder in C# and Java, and have not worked with videos before; so just wanted to ask if anyone knows a good approach to this problem & any precautions with the memory handling.

    submitted by /u/TheOneTrueHobo
    [link] [comments]

    Digital Pet

    Posted: 17 Aug 2018 10:02 PM PDT

    Hey there, completely new to coding and hoping to one day code a tamagotchi (ultimate end goal). I have begun learning python through codeacademy, but I'm really wondering if this is a step in the right direction? What I'd like to know is if this path will lead me towards my end goal, or have I already begun to stray off the path? Thanks!

    submitted by /u/Pikminredyellow
    [link] [comments]

    Help with AJAX for Flask

    Posted: 17 Aug 2018 10:00 PM PDT

    So right now I'm building a webserver using Flask, and everything was going well up until these last few days. Currently I am trying to link an HTML button to a python script, so when I click the button, it will execute the script. However, all I get is 404s, and it simply doesn't work. I don't have a fundamental understanding of AJAX, but due to a lack of time, I can only learn it later after I am done with this project. Can someone look at my files, particularly ajax.html, because I have no idea what syntax to use, how to format it, really anything in general?

    Also, inside ajax.html, the part that's probably wrong is especially the part within <script> and </script>.

    https://github.com/asdfghj1332/Webserver-v1

    I think my tree for the ajax.html trying to reference trigger_camera.py might be messed up. Is my tree for said part messed up?

    Particularly, I get 404s when I try to click the button on "ajax.html"

    submitted by /u/DAWG420BLAZEIT
    [link] [comments]

    C# Projects for Beginners?

    Posted: 17 Aug 2018 05:54 PM PDT

    I'm teaching myself C#, and I'm ready to move beyond writing stuff for the system console. Does anyone know where I can find some beginner-level project ideas?

    submitted by /u/TheBlackPopeSJ
    [link] [comments]

    For loop to pull out the number out of a string in a array list?

    Posted: 17 Aug 2018 09:16 PM PDT

    submitted by /u/soggypizza1
    [link] [comments]

    Are there any git tutorial that is scenario-centric instead of command-centric?

    Posted: 17 Aug 2018 09:26 AM PDT

    Every tutorial I can find teaches you a million ways of using git rebase. But I just want to know how to use a few commands together in a few common scenarios/workflow. Currently it feels like learning a new language by reading every definition of every word in a dictionary.

    submitted by /u/netok
    [link] [comments]

    How to call upon a function within class in pygame

    Posted: 17 Aug 2018 08:30 PM PDT

    Here is the code for my class:

    class ballShow: def __init__(self, ballX, ballY, force, maxforce): self.ballX = ballX self.ballY = ballY self.force = force self.maxforce = maxforce pygame.draw.circle(screen, red, (self.ballX, self.ballY), 10) def fall(self): if self.ballY < h-self.radius: self.y += self.force if self.force <self.maxforce: self.force += 1 elif self.y > h-self.radius or self.y == h_self.radius: self.y = h-self.radius-1 self.force = self.force * -1 self.maxforce = self.maxforce/2 pygame.draw.circle(screen,red, (self.ballX, self.ballY), 10) 

    And here is the code where I attempt to call the function fall:

    for i in ballShow: i.fall() 

    The error message I get reads:

    TypeError: 'classobj' object is not iterable 
    submitted by /u/HandfulOfAStupidKid
    [link] [comments]

    I'm new to programming and am new to C++, What are some recommendations for books or online tutorials to learn C++ and even programming fundamentals to learn how languages work

    Posted: 17 Aug 2018 12:50 PM PDT

    I know there are easier languages, but I'd like to learn c++ for game development in unity and unreal.

    submitted by /u/patrickyayo
    [link] [comments]

    Understanding classes in OOP languages

    Posted: 17 Aug 2018 08:21 PM PDT

    I've recently started learning C++ and Java for university. I'm mostly having no problems but I can't wrap my head around classes - the point of them, what they do, how they work, etc. I'm aware that classes are a major part of object orientated languages and I'm eager to understand them. I do, however, functions.

    I've watched a few videos and read articles explaining them, but no luck. If anyone can recommend a video or has a good explanation I'd love to see it .

    submitted by /u/ZaaBLes
    [link] [comments]

    Learning how to properly apply Continuous Integration: CI-Analyser helps you!

    Posted: 17 Aug 2018 02:22 PM PDT

    Hey r/learnprogramming,

    I'm Carmine, a researcher at the University of Zurich and I am interested in supporting developers working with continuous integration (CI).

    I created a reporting tool that analyzes the CI logs of a project to identify deviations from accepted CI best practices. It can generate reports about the CI practice for Java/Maven projects that are built with TravisCI, for example, for the well-known DSpace or Google Guava projects. Please send me a link to your TravisCI project, if you want to get your report as well!

    I would highly appreciate, if you could find the time to give me some feedback on the generated reports. Do you think you would learn something from them? Can be useful in avoiding common mistakes related to CI?

    Please fill out the following survey http://www.surveygizmo.com/s3/4515476/Summarizing-the-Continuous-Integration-Process, which will introduce the tool with several screenshots. It usually takes 7 minutes.

    If you have questions, please comment on this post or send an email at the address you'll find in the survey.

    Carmine

    submitted by /u/mrcarasus
    [link] [comments]

    Advice for defining the structure and features of an application-specific language.

    Posted: 17 Aug 2018 08:13 PM PDT

    First time posting here, feel free to point me to another subreddit if this one isn't suited for this.

    Background: I'm a Computer engineering student and this semester I have to build a basic compiler or translator. I play a game that uses tag-based plaintext files to define objects in-game. Initially I was only going to build a lexer and parser as a writing aid but with the translating requirement of the project, I'll have to define a custom language if I want to pass, that translates into appropriate tag files.

    I'm not building it yet, but I wanted to have a good grasp of what I wanted to do so I could start applying knowledge gained in class to the project with some time in advance, and at the same time I wanted something that could actually be more readable and convenient.

    An object definition looks like this.

    [OBJECT:ITEM] [ITEM_AMMO:ITEM_AMMO_BOLTS] [NAME:bolt:bolts] [CLASS:BOLT] [SIZE:150] [ATTACK:EDGE:5:1000:stab:stabs:NO_SUB:1000] [ATTACK_PREPARE_AND_RECOVER:3:3] 

    Basically, each kind of object has specific tags that define its behavior. Some tags are standalone and some have arguments. People need to read the "documentation" to be able to know what does each argument does.

    I mocked up the following code snippet demo for the previous object, although I omitted the last tag.

    So basically, I'm not sure if the code structure I have in my head is good or not, or if I'm missing anything essential from it, or how to make it more intuitive. I'm not sure where else could I get any pointers about it since it's not actually a general programming language.

    submitted by /u/JoshFireseed
    [link] [comments]

    No comments:

    Post a Comment