Learn Programming

!learn_programming

@lemmy.ml
Create post
How to write unit tests for software that reads files, has a GUI or uses the internet?

How to write unit tests for software that reads files, has a GUI or uses the internet?

Most introductions to unit testing give very simple examples of functions that simply receive some arguments and produce a result. However a lot of software has to read input from external sources, such as from the internet, from the file system, or from the user during its execution. How does one write tests for such software?

For simple software that only reads a few files from the file system, I imagine can be tested by writing some files for the test to give to the tested program, but what if it becomes more complex? Or what if you are trying to test a web scrapper for a website, would the tests run a web server and simulate the targetted website? Or for the GUI, how would one test that the user can see what they are supposed to see, when they click a certain way at a certain time?

Maybe the parts that read the data shouldn't be tested and only the functions that code relies on should be tested? I don't know.

I made a new lemmy community for bug bounties

I made a new lemmy community for bug bounties

Open link in next tab

https://lemmy.ml/c/bugbounties

Does your OSS project have an issue that needs fixing? Post a bounty here! We do not vouch for any projects posting bounties here or their ability to pay, you are responsible for evaluating risks yourself. Rules: 0. Title must state bounty amount in USD, EUR, or BTC. Crypto bounties are allowed, just list rough USD/EUR/BTC equivalent amount as well. Crypto bounties must be paid out in a Top 20 market cap coin. 1. OSS projects only 2. Limit one post per month per project 3. No links to bountysource. 4. Bounties must be open to all devs from all countries, with room to comply with your own government’s regulations (sanctions, etc). 5. Nothing illegal or morally questionable

Advice for setting up a debugger for a particular implementation of Javascript? (ImageJ)

Advice for setting up a debugger for a particular implementation of Javascript? (ImageJ)

Hi! I'm a self-taught novice programmer trying to write a macro in javascript for ImageJ. I've built a program that I think works, but trying to debug it without a proper debugger has been hell. I'm a hair away from just giving up and rewriting the whole thing in the program's native macro language. I looked online and it seems like I should be able to set up a debugging environment in Visual Studio Code, but I couldn't find any guide for doing that specifically for ImageJ. I use Visual Studio Code to write my javascript, but any advice on any platform or even just what I need to find to get started would be helpful. Thank you!

Git Notes: git's coolest, most unloved­ feature - Tyler Cipriani

Git Notes: git's coolest, most unloved­ feature - Tyler Cipriani

Open link in next tab

Git Notes: git's coolest, most unloved­ feature - Tyler Cipriani

https://tylercipriani.com/blog/2022/11/19/git-notes-gits-coolest-most-unloved-feature/

What is Spring Framework? An Unorthodox Guide

What is Spring Framework? An Unorthodox Guide

Open link in next tab

What is Spring Framework? An Unorthodox Guide

https://www.marcobehler.com/guides/spring-framework

You can use this guide to understand what Spring framework is and how its core features like dependency injection or aspected oriented programming work. Also, a comprehensive FAQ.

What is Spring Framework? An Unorthodox Guide
Helsinki Mooc...Python I exam

Helsinki Mooc...Python I exam

I've been working through the homework and feeling good. I think I want to take the first exam on Oct 1. Anyone done this before? I'm successfully getting through homework, but looking for tips on what else I can do to prepare to successfully pass the exam.

Although it's free...I already took the morning off from my hourly job to take the exam...so...I really want, not just to pass, but really kill it!

Oh My Git! - an open source game about learning Git!

Oh My Git! - an open source game about learning Git!

Open link in next tab

Oh My Git!

https://ohmygit.org/

An open source game about learning Git

Oh My Git!
How to Install Java on Raspberry Pi In Easy Steps

How to Install Java on Raspberry Pi In Easy Steps

Open link in next tab

How to Install Java on Raspberry Pi In Easy Steps

https://www.tecnohub.org/2022/02/how-to-install-java-on-raspberry-pi-in.html

Tutorial will show you how to install Java (OpenJDK) on a Raspberry Pi running the newest Raspbian OS. Oracle Java and OpenJDK are two alternative...

How to Install Java on Raspberry Pi In Easy Steps
Learn almost anything, kindergarten to college [KhanAcademy]

Learn almost anything, kindergarten to college [KhanAcademy]

Open link in next tab

Khan Academy | Free Online Courses, Lessons & Practice

https://www.khanacademy.org/

Learn for free about math, art, computer programming, economics, physics, chemistry, biology, medicine, finance, history, and more. Khan Academy is a nonprofit with the mission of providing a free, world-class education for anyone, anywhere.

Khan Academy | Free Online Courses, Lessons & Practice
Kernighan & Ritchie: "The C Programming Language" [PDF]

Kernighan & Ritchie: "The C Programming Language" [PDF]

Open link in next tab

Page not found - Walter Scott, Jr. College of Engineering

https://www.engr.colostate.edu/ECE251/References/The%20C%20Programming%20Language.pdf

The Walter Scott, Jr. College of Engineering at CSU engages water, health, energy, and environmental challenges through leadership in engineering research, education, and innovation.