Jump to content

Recommended Posts

i started coding in python 2 days ago 

and my brother helped me make something to track water parameters

action = input("what do you want to do A.write test, B.read test")



if action == ("A"):
    ph = str(input("whats the ph"))
    gh = str(input("whats the gh"))
    kh = str(input("whats the kh"))
    nitrates = str(input("whats the nitrate"))
    tests = ("\n\nnitrates: %s general Hardness: %s karbonate hardness: %s nitrate: %s "% (ph,gh,kh,nitrates))
    
    optional_tests = input("do you want to log NH3, NO2, PO4, misc")
    if optional_tests == ("Y"):
        phosphate = str(input("whats the phosphate"))
        ammonia = str(input("whats the ammonia"))
        nitrite = str(input("whats the nitrite"))
        chlorine = str(input("whats the the chlorine"))
        copper = str(input("whats the copper"))

        optional_test = ("\n\nphosphate: %s ammonia: %s nitrite: %s chlorine: %s copper: %s"% (phosphate,ammonia,nitrite,chlorine,copper))
        optional_test_file = open("optional_test.txt", "a")
        optional_test_file.write(str(optional_test))
        optional_test_file.close

    
    testfile = open("water parameter tracker.txt", "a")
    testfile.write(str(tests))
    testfile.close

download the latest version of python https://www.python.org/downloads/

you make a 2 text files called  "water parameter tracker.txt" and ""optional_test.txt" make sure they are in the same directory as the program

what have you made/working on? 

  • Like 2
Link to comment
Share on other sites

8 minutes ago, Squeegee79 said:

Never used Python myself. I currently code in C#/Razor, Javascript/jQuery/typescript, HTML, CSS. I have used php in the past as well, with a smidge of java. Pretty easy to follow what your code is doing though.

I have never used it for help with fish keeping though.

eventually I want to add gui and graphs 

I tried using c# for making games in unity but there were thing i enjoyed more that I could do with less frustration  and time 

Link to comment
Share on other sites

  • 2 weeks later...

I’ve used Python in my work for a few years now, but nothing hardcore. I mostly use it for infrastructure automation scripts (along Powershell, BASH, etc). I like Python a lot.

I have a little experience with C#, ASP, PHP, etc, but I’m not really much of web or application developer. I do more DevOps automation/workflow kind of things.

I prefer python when I have to interact with APIs or am putting something together for a Linux-based environment.

It’s a great language to learn. Much easier then when I was young trying to pick up C++ !!  Good luck with it!

Link to comment
Share on other sites

I learned BASIC in grade school, then Pascal in HS, then C in engineering classes, and LISP in architecture classes, which was my favorite programming language. Code that could modify code while running was mind-expanding. I know HTML and CSS for volunteer reasons. I want to come back to Common Lisp. I had a lot of fun writing cellular automata software for art back in the mid-nineties.

image.jpeg.f18ba5d7114764d8015ecdd26a4e39e1.jpeg

image.jpeg.55a651e5beb7e37433be91613dd52075.jpeg

image.jpeg.6dc1a25394341d54dfe382cf3db8f107.jpeg

image.jpeg.64b92e2cca3a96614c098130bfe6677f.jpeg

image.jpeg.3b0ec4c66657c49d5cc270dfd721a519.jpeg

image.jpeg.0465abe071a3ab6b79e2d79247303e1a.jpeg

image.jpeg.b07b872319b5eefa3ad951d99f0120f9.jpeg

image.jpeg.ca6376a4f33980b01e2029651a64f83e.jpeg

image.jpeg.e50ef3b50ff28332c6ea782a8faa3c07.jpeg

 

image.jpeg.00c3d77d21621f990dfea77fd73e833a.jpeg

image.jpeg.78cf2850265664ac53e7647afbc6f215.jpeg

image.jpeg.20cb8cf1641859109a49827ce76a1195.jpeg

image.jpeg.81ea97f0350a9b69dcf0996145ca62c7.jpeg

image.jpeg.2b375ded1a131ba22cf79ac1b582a1da.jpeg

image.jpeg.90683bde34d61e1099a6c427d38f9e70.jpeg

Edited by Streetwise
Images
  • Like 3
Link to comment
Share on other sites

  • 3 months later...
Posted (edited)

I coded for years and years in mostly in C++ and a bit of java, python but in the old days it was macro10. Mostly socket code but a bit of this and that as needed. Hum lets see if i remember a few lines:

 

#include <map>

#include <string>

 

 

void printall(stl:map<int std::string> age) {

    for(std::map<int,std::string>::it=age.begin(); it != age.end(); it++) {

         ...

    }

}

(of course these days folks forget how to use a basic for loop and just use foreach)

-

Macro 10 -- hum that's a tough one i don't think i remember macro10 or for that matter  bliss10 off the top of my head ... been too many years. 

 

Edited by anewbie
  • Like 1
Link to comment
Share on other sites

Posted (edited)

I have friends which work in software development company, they can help you or read this https://mlsdev.com/blog/hire-app-developer. Custom software application development involves a series of processes that begin with choosing a software development company that meets the business's specific requirements. The software development company is tasked to create a software application or program that meets the business's needs and specifications. At this stage, the developer(s) work together with the business to determine the software requirements thoroughly, and to come up with an appropriate design. Once the design is finalized, the software development company can now begin work on the software development process.

Edited by gretamorilia
  • Like 1
Link to comment
Share on other sites

I've been a frontend developer for years (HTML/CSS/Javascript). I took a Python class a few years ago and really enjoyed the automation possibilities. I'm also an ecommerce web manager, so it's since saved me hundreds of hours of work automating repetitive tasks like renaming images, downloading files and categorizing items to sell on the web. I really geek out writing little scriptlets to chunk through large amounts of data and manipulate it so that it works for what I need it to.

My latest project is kind of a dashboard display for a TV mounted on the wall in my kitchen. Currently, it's got a Google calendar integration, a meal planner, a countdown, weather forecast, notes, basketball scores and messaging capabilities. I'm working on trying to find some cool way to display my water parameters there, but I haven't had the time to complete. And I keep getting more tanks, so that widget keeps getting bigger...

  • Like 1
Link to comment
Share on other sites

On 2/4/2021 at 3:08 PM, quirkylemon103 said:

eventually I want to add gui and graphs 

I tried using c# for making games in unity but there were thing i enjoyed more that I could do with less frustration  and time 

I would recommend switching to a `csv` file and treat each day of tests as a row. It will make it a lot easier to plot the data on graphs later. Check out this link and scroll down to "Writing CSV files Using csv.writer()" for a quick guide on how to do it. Then you can use `matplotlib` to make graphs or use pandas to do trend analysis.

Let me know if you have any questions, I'm a full-stack developer and have been coding since middle school 🙂

  • Like 2
Link to comment
Share on other sites

Posted (edited)
19 minutes ago, Arcite said:

I would recommend switching to a `csv` file and treat each day of tests as a row. It will make it a lot easier to plot the data on graphs later. Check out this link and scroll down to "Writing CSV files Using csv.writer()" for a quick guide on how to do it. Then you can use `matplotlib` to make graphs or use pandas to do trend analysis.

Let me know if you have any questions, I'm a full-stack developer and have been coding since middle school 🙂

that looks  . . . complicated, I am not experienced at coding at all, I haven't really done anything with programming except some super basic stuff in autohotkey since the water parameter tracker. the issue is I start a project then I don't come back to it.

does anyone have idea on a simple project I could work on to get better at python?

Edited by quirkylemon103
Link to comment
Share on other sites

Posted (edited)

Working with CSVs in Python isn't too bad once you get the hang of it. You're basically doing the same thing you're doing with the .txt file, just with a CSV. And if there's one thing that makes sense to keep in a table, it's water parameters

import csv
# if you're opening a new file, it would be output = open('water-parameters.csv', 'w')
output = open('water-parameters.csv', 'a')
writer = csv.writer(output, delimiter=',', quotechar='"', quoting=csv.QUOTE_ALL)
# if you don't already have a header row
writer.writerow(['Date', 'PH', 'GH', 'KH', 'nitrates', 'NH3', 'NO2', 'PO4', 'misc'])

rowOutput = [thedate, theph, thegh, thekh, thenitrates, theNH3, theNO2, thePO4, themisc]
# you can also do writer.writerows if you have a list of lists (multiple lines to write)
writer.writerow(rowOutput)
Edited by B1gJ4k3
  • Like 1
Link to comment
Share on other sites

On 5/20/2021 at 4:08 PM, Cory said:

WRITELN nerd @Streetwise

Mom, Cory called me a nerd! 😉

I was the hotshot programmer in my kindergarten class. We had a Commodore PET, the precursor to the VIC-20, and then the Commodore 64. I wrote a BASIC program to count up indefinitely. Then I took it to the next level and made it count up by tens.

@Patrick_G, I think we might be the last gasp of Generation X. Almost all of my tech knowledge has periodically expired and been replaced, except for TCP/IP, DNS, *nix/BSD terminal commands, and troubleshooting steps.

Besides my work WiFi, network, firewall stuff, my personal tech pride goes into building and running this Drupal/CiviCRM site as a volunteer:

https://lcyc.info

  • Like 1
Link to comment
Share on other sites

On 5/25/2021 at 4:35 PM, Streetwise said:

Mom, Cory called me a nerd! 😉

I was the hotshot programmer in my kindergarten class. We had a Commodore PET, the precursor to the VIC-20, and then the Commodore 64. I wrote a BASIC program to count up indefinitely. Then I took it to the next level and made it count up by tens.

yesterday I made a autohotkey script to count 1 by 1 and post(not on anything public, I had permission from the server owner) every 10 numbers

also I have been watching tom scott who has some good programming videos 

one of my favorites 

now I am working on making games . . . for projects besides aquarium I have the attention span of a day 🤣

 

Link to comment
Share on other sites

  • 1 month later...

Funny how we all use the same language but it means different things to different people, I too learnt what way back then was referred to as programming in Basic, some Pascal, and Cobol, haven't used it much since.

In another life as a nurse your first and foremost concern was to keep your patients from coding, the worst of which was Code Blue meaning the patient was apneic (without breath) and pulseless, it also meant a team of us would come barreling down the hallway pushing what was referred to as a crash cart with a defibrillator,  and appropriate meds.

I know intuitively that "coding" on this forum would not  refer to that kind of coding, yet for a split second my brain went to that subject first. Just goes to show how strongly, and deeply a trained physical emergency routine can be buried in our brains, and weird when it really sinks in and you realize you got conditioned by your work.

  • Like 1
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...