Your first coding projects!

I was looking arround on github and I suddenly found this: GitHub - thomas15v/easyADB.
I think this was my second coding project that I made lol. And omfg I feel ashamed :worried:. form1.vb is a disaster.

Anyone else that still has his first coding projects around and wanna share?

1 Like

I made [this] (https://github.com/zombachu/Synergy) a while ago (then gave the repo to a friend later)

It’s an absolute hellscape when it comes to code quality and is probably the worst project I’ve worked on (based on code quality) that’s still around. I tried to updated it once, but you can probably guess how that turned out… :trollface:

So yeah, long story short that code is being redone from the ground up because it’s just that bad.

1 Like

my first one isn’t available on github - but I guess that it was a a simple quiz written in batch (5 - 6 years ago) ^^

1 Like

Well at least it has OO :stuck_out_tongue:. That 3 year old project from my doesn’t even have an interface. And I use switch everywhere ;-;.

Mine got accidentally deleted.

3 Likes

OpenLamp was a script that set up a webserver. Was mostly used among my Networking class users.

clear
echo "OPENlamp. Version 1.6"
if [ -e /usr/bin/zenity ]
then
zenity --question --text="You have Zenity Installed. Continuing with script."
else
	echo "Zenity is needed for this script to run properly.  Installing Zenity"
	echo "...."
	sleep 3
	sudo aptitude install zenity
fi
#The following part of the script is just to make sure that you ran this script with sudo. It won't damage anything.
sudo echo "#This was a test for server.sh. You may remove this, but as it is commented, it does not effect your file." >> /etc/hosts
if [ $? -eq 0 ]
then
	zenity --question --text="You're using sudo. Good."
else
	zenity --question --text="You MUST run this script with Sudo. (e.g. 'sudo ./server.sh') This script will now close."
	exit 1
fi 
#Ending testing.
zenity --question --text="OPENlamp v.1.6\nServer Setup and Configuration Script\nCopyright 2009 to Nicholas Badger.\nGPLv3 Licensed\nThis Script is meant to be run for FRESH installs of Apache2, mySQL, and PHP. If there is any existing instances of these programs, problems may occur!\n\nTo continue, press 'OK'. 'Cancel' will close this script."
if [ $? = 1 ]
then
	echo "Script is Terminating.. please wait..."
	exit 1
fi
zenity --question --text="I am going to install apache2. Is this okay with you?"
if [ $? = 1 ]
then
	zenity --question --text="Skipping Apache2 installation."
else
	sudo dpkg --configure -a
	sudo apt-get -y install apache2
        sudo echo "ServerName localhost" >> /etc/apache2/apache2.conf
	sudo /etc/init.d/apache2 restart
fi
zenity --question --text="I am now going to work on installing PHP. Is this okay with you?"
if [ $? = 1 ]
then
	zenity --question --text="Skipping PHP installation."
else
	sudo apt-get -y install -y php5
fi
zenity --question --text="If you want me to install mySQL on your computer, continue by clicking OK."
if [ $? = 1 ]
then
	 zenity --question --text="Skipping mySQL installation."
else
	 sudo apt-get -y install mysql-server libapache2-mod-auth-mysql php5-mysql
fi
zenity --question --text="I'm going to install phpMyAdmin and configure parts of it for you. Is that OK?"
if [ $? = 1 ]
then
	  zenity --question --text="Skipping phpMyAdmin installation."
else
	  sudo apt-get -y install phpmyadmin
	  sudo echo "Include /etc/phpmyadmin/apache.conf" >> /etc/apache2/apache2.conf
fi
zenity --question --text="I'm going to install mySQL-admin. Is this OK?"
if [ $? = 1 ]
then
	  zenity --question --text="Skipping mySQL-admin installation."
else
	  sudo apt-get -y install mysql-admin
fi
zenity --question --text="I'm going to restart Apache, test configuration, and then Restart again. Is that fine with you? (If 'No is selected, I will still restart Apache. That step is still necessary to run it correctly."
if [ $? = 1 ]
then
	  sudo /etc/init.d/apache2 restart
	  zenity --question --text="Skipping Apache configuration"
else
	  sudo /etc/init.d/apache2 restart
	  sudo /usr/sbin/apache2ctl configtest
          sudo /usr/sbin/apache2ctl restart
	  zenity --question --text="If you did NOT get 'Syntax OK', contact your system administrator to find the faulty file(s)."
fi
zenity --question --text="This part of setup will install and configure parts of vsFTPd. vsFTPd is a very secure FTP server and is needed to use ftp on your website: locally or commercially."	  
if [ $? = 1 ]
then
	   zenity -- question --text="Skipping vsFTPd installation/configuration"
else
	   sudo apt-get -y install vsftpd
	   zenity --question --text="You can find the original vsftpd, if you need to troubleshoot or want to read it, at '/etc/vsftpdball.conf'."
	   sudo cp /etc/vsftpd.conf /etc/vsftpdbakk.conf
	   sudo echo "listen=YES" > /etc/vsftpd.conf
	   sudo echo "dirmessage_enable=YES" >> /etc/vsftpd.conf
	   sudo echo "use_localtime=YES" >> /etc/vsftpd.conf
	   sudo echo "xferlog_enable=YES" >> /etc/vsftpd.conf
	   sudo echo "connect_from_port_20=YES" >> /etc/vsftpd.conf
	   sudo echo "secure_chroot_dir=/var/run/vsftpd/empty" >> /etc/vsftpd.conf
	   sudo echo "pam_service_name=vsftpd" >> /etc/vsftpd.conf
	   sudo echo "rsa_cert_file=/etc/ssl/certs/ssl-cert-snakeoil.pem" >> /etc/vsftpd.conf
	   sudo echo "local_enable=YES" >> /etc/vsftpd.conf
	   sudo echo "write_enable=YES" >> /etc/vsftpd.conf
	   sudo /etc/init.d/vsftpd restart
fi
zenity --question --text="You should now have a running Apache2, PHP5, FTP, and mySQL server running along with all the bells and whistles. Thank you for using my script."

And a later version of OpenLamp, GSIK.

#GSIK was designed for Ubuntu by Nicholas Badger (alias, dZ).
#Script relies heavily on the 'zenity' program being installed. If it isn't, this script should install it for you.
#GSIK was originally called OPENlamp. OPENlamp was in BETA v1.6 before it's name change.
#Currently, GSIK is in BETA version 1.1.
#GSIK is licensed under the terms of GPLv3 or later, found at http://www.gnu.org/licenses/gpl-3.0.html
#
#This script will, with your permission at every step, install programs/information not affiliated with itself.
#No guarantee comes with this shell script, even though I wish I could offer as such.
#Use at your own discretion.
#
#If GSIK is not downloaded as executable, you can do so yourself by following the steps below...
#Move GSIK to your desktop. 
#Open a Terminal > type 'cd ~/Desktop' > type 'sudo chmod a+x ./gsikv1.sh'.
#or...
#Right click on 'gsikv1.sh' > Properties > 'Permissions' tab > check the box that says 'Allow executing file as program'.
#
#Please be aware that this script must be ran with Administrative Permissions.
#To do this, please follow the steps below...
#Open a Terminal > type 'cd ~/Desktop' > type sudo ./gsikv1_1.sh'.
#You WILL be prompted with your password.
#
#If any help is needed, you may contact me.
#'[email protected]' (nichob[at]dreamrp[dot]com).
#
clear
#
#STARTING COLOR CODENAME SETTER
RED="\033[1;31m"
GREEN="\033[1;32m"
BLUE="\033[1;34m"
INSTALL="\033[1;56m"
ENDCOLOR="\033[0m"
echo -e $BLUE"Welcome to the GSIK Installer. Please wait a moment while pre-installation commands are ran."$ENDCOLOR
#ENDING COLOR CODENAME SETTER
#
#STARTING SUDO CHECK
echo -e $BLUE"This script is going to need your password. Please enter it to continue."$ENDCOLOR
sudo touch /var/sudotest.txt
if [ $? -eq 0 ]
then
        sudo rm /var/sudotest.txt
else
        echo -e $RED"GSIK must be ran with sudo (e.g. sudo ./gsikv1.sh)."$ENDCOLOR
	echo -e $RED"Terminating script... Please wait."$ENDCOLOR
	sleep 5
	clear
	exit 1
fi
#ENDING SUDO CHECK
#
#STARTING ZENITY CHECK
if [ -e /usr/bin/zenity ]
then
	echo -e $GREEN"Zenity is installed. This script will continue."$ENDCOLOR
else
	echo -e $BLUE"Zenity is needed for this script to run properly..."$ENDCOLOR
	echo -e $BLUE"Please wait while Zenity is installed..."$ENDCOLOR
	sleep 1
	echo -e $INSTALL
	sudo aptitude install zenity
	echo -e $ENDCOLOR
	if [ $? -eq 0 ]
	then
		clear
		echo -e $GREEN"Zenity is installed. This script will continue."$ENDCOLOR
	else
		echo -e $RED"For some reason, unknown, Zenity could not install. Please check your internet connection and repositories."$ENDCOLOR
		sleep 1
		echo -e $RED"This script will not run without Zenity installed and working. Please, run GSIK again when you have fixed the problem. Thank you."$ENDCOLOR
		sleep 1
		echo -e $RED"GSIK will terminate in five seconds."$ENDCOLOR
		sleep 5
		exit 1
	fi
fi
#ENDING ZENITY CHECK
#
#STARTING COPYRIGHT INFORMATION WINDOW
zenity --info --title="Copright Information" --text="GSIK v.1.1\nGraphical Server Installer and Konfigurator\nCopyright 2010 to Nicholas Badger under GPLv3.\n\nThis script was designed to install Apache2, PHP5, mySQL, vsFTPd, a few tools to help run your server, and configure parts of the said installations."
#ENDING COPYRIGHT INFORMATION WINDOW
#
#STARTING UPDATE PROCEEDURE
zenity --question --title="Update?" --text="Updates may be needed for this script to run properly. Is it okay for me to run a couple of commands not directly related to this program to ensure that it runs correctly?\nPress 'Cancel' to skip possibly needed update. Press 'OK' to continue."
if [ $? = 1 ]
then
	echo -e $BLUE"Skipping update..."$ENDCOLOR
else
	echo -e $INSTALL
	sudo dpkg --configure -a
	sudo aptitude update
	echo -e $ENDCOLOR
        clear
	echo -e $GREEN"Update complete..."$ENDCOLOR
fi
#ENDING UPDATE PROCEEDURE
#
#STARTING GSIK PROGRAM INSTALLATION CHOOSER WINDOW
ans=$(zenity  --list  --width=625 --height=260 --text "GSIK > Please choose which programs you want to install...\nIf you press 'Cancel', this installation process will close.\nIf you want to just run the configuration portion of my script, please click 'OK' without selecting any of the programs below." --checklist  --column "Select" --column "Options" --column "Description" FALSE "Apache2 WebServer" "Apache is the leading webserver manager." FALSE "PHP5" "PHP5 is a leading database and language inregration manager." FALSE "mySQL" "mySQL is the webserver database manager." FALSE "phpMyAdmin" "phpMyAdmin is the leading PHP5 webserver manager." FALSE "mySQL-admin" "mySQL-admin is the leading mySQL webserver manager." FALSE "vsFTPd" "vsFTPd is a very safe FTP database." --separator=":");
#ENDING GSIK PROGRAM INSTALLATION CHOOSER WINDOW
#
#STARTING "IF CANCEL IS CLICKED"
if [ $? = 1 ]
then
	echo -e $RED"Program Terminated"$ENDCOLOR
	exit 1
fi
#ENDING "IF CANCEL IS CLICKED"
#
arr=$(echo $ans | tr "\:" "\n")
for x in $arr
do
	if [ $x = "Apache2" ]
	then
		clear
		echo -e $BLUE"I am installing Apache2...."$ENDCOLOR
		echo -e $INSTALL
		sudo apt-get -y install apache2
		echo -e $ENDCOLOR
		echo -e $GREEN"Installation of Apache2 complete!"$ENDCOLOR
	fi
	if [ $x = "php5" ]
	then
		clear
		echo -e $BLUE"I am installing PHP5...."$ENDCOLOR
		echo -e $INSTALL
		sudo apt-get -y install php5
		echo -e $ENDCOLOR
		echo -e $GREEN"Installation of PHP5 complete!"$ENDCOLOR
	fi
	if [ $x = "mySQL" ]
	then
		clear
		echo -e $BLUE"I am installing mySQL...."$ENDCOLOR
		echo -e $INSTALL
		sudo apt-get -y install mysql-server
		sudo apt-get -y install libapache2-mod-auth-mysql
		sudo apt-get -y install php5-mysql
		echo -e $ENDCOLOR
		echo -e $GREEN"Installation of mySQL complete!"$ENDCOLOR
	fi
	if [ $x = "phpMyAdmin" ]
	then
		clear
		echo -e $BLUE"I am installing phpMyAdmin...."$ENDCOLOR
		echo -e $INSTALL
		sudo apt-get -y install phpmyadmin
		echo -e $ENDCOLOR
		echo -e $GREEN"Installation of phpMyAdmin complete!"$ENDCOLOR
	fi
	if [ $x = "mySQL-admin" ]
	then
		clear
		echo -e $BLUE"I am installing mySQL-admin...."$ENDCOLOR
		echo -e $INSTALL
		sudo apt-get -y install mysql-admin
		echo -e $ENDCOLOR
		echo -e $GREEN"Installation of mySQL-admin complete!"$ENDCOLOR
	fi
	if [ $x = "vsFTPd" ]
	then
		clear
		echo -e $BLUE"I am installing vsFTPd...."$ENDCOLOR
		echo -e $INSTALL
		sudo apt-get -y install vsftpd
		echo -e $ENDCOLOR
		echo -e $GREEN"Installation of vsFTPd complete!"$ENDCOLOR
	fi
done
#
#STARTING GSIK PROGRAM CONFIGURATION CHOOSER WINDOW
ans=$(zenity  --list  --width=625 --height=260 --text "GSIK > Please choose which programs you want me to configure for you automatically...\nIf you press 'Cancel', this configuration process will close.\n" --checklist  --column "Select" --column "Options" --column "Description" FALSE "Configure Apache2" "This will edit/add files that are needed for Apache to function correctly." FALSE "Configure vsFTPd" "This will edit/add files that are needed for vsFTPd to function correctly." --separator=":");
#ENDING GSIK PROGRAM CONFIGURATION CHOOSER WINDOW
#
#
#STARTING "IF CANCEL IS CLICKED"
if [ $? = 1 ]
then
	echo -e $RED"Program Terminated"$ENDCOLOR
	exit 1
fi
#ENDING "IF CANCEL IS CLICKED"
#
arr=$(echo $ans | tr "\:" "\n")
for x in $arr
do
	if [ $x = "Apache2" ]
	then
		clear
		echo -e $BLUE"I am now configuring Apache2...."$ENDCOLOR
		echo -e $INSTALL
		sudo cp /etc/apache2/apache2.conf ~/Desktop/apache2.conf
		sudo chmod 777 ~/Desktop/apache2.conf
		echo "ServerName	localhost" >> ~/Desktop/apache2.conf
		sudo chmod 644 ~/Desktop/apache2.conf
		sudo cp ~/Desktop/apache2.conf /etc/apache2/apache2.conf
		sudo rm ~/Desktop/apache2.conf
		echo -e $ENDCOLOR
		echo -e $GREEN"Configuration of Apache2 complete!"$ENDCOLOR
	fi
	if [ $x = "vsFTPd" ]
	then
		clear
		echo -e $BLUE"I am now configuring vsFTPd...."$ENDCOLOR
		echo -e $INSTALL
		sudo cp /etc/vsftpd.conf /etc/vsftpd.conf.bak
		touch ~/Desktop/vsftpd.conf
		echo "listen=YES" > ~/Desktop/vsftpd.conf
		echo "dirmessage_enable=YES" >> ~/Desktop/vsftpd.conf
		echo "use_localtime=YES" >> ~/Desktop/vsftpd.conf
		echo "xferlog_enable=YES" >> ~/Desktop/vsftpd.conf
		echo "connect_from_port_20=YES" >> ~/Desktop/vsftpd.conf
		echo "secure_chroot_dir=/var/run/vsftpd/empty" >> ~/Desktop/vsftpd.conf
		echo "pam_service_name=vsftpd" >> ~/Desktop/vsftpd.conf
		echo "rsa_cert_file=/etc/ssl/certs/ssl-cert-snakeoil.pem" >> ~/Desktop/vsftpd.conf
		echo "local_enable=YES" >> ~/Desktop/vsftpd.conf
		echo "write_enable=YES" >> ~/Desktop/vsftpd.conf
		sudo chmod 644 ~/Desktop/vsftpd.conf
		sudo cp ~/Desktop/vsftpd.conf /etc/vsftpd.conf
		sudo rm ~/Desktop/vsftpd.conf
		clear
		echo -e $ENDCOLOR 
		echo -e $GREEN"vsFTPd Configuration Completed."$ENDCOLOR
	fi
done
echo -e $RED"======================================"$ENDCOLOR
echo -e $RED"==I AM RESTARTING IMPORTANT PROGRAMS=="$ENDCOLOR
echo -e $RED"======================================"$ENDCOLOR
echo -e $INSTALL
sudo /etc/init.d/apache2 stop
sudo /etc/init.d/apache2 start
sudo /etc/init.d/apache2 restart
sudo /etc/init.d/vsftpd stop
sudo /etc/init.d/vsftpd start
sudo /etc/init.d/vsftpd restart
echo -e $ENDCOLOR
echo -e $RED"======================================"$ENDCOLOR
echo -e $RED"==============I AM DONE==============="$ENDCOLOR
echo -e $RED"======================================"$ENDCOLOR
#STARTING COLOR CODENAME UNSETTER
unset BLUE
unset RED
unset GREEN
unset INSTALL
unset ENDCOLOR
#ENDING COLOR CODENAME UNSETTER

My first program (that was actually useful) was a small batch file for launching different versions / mods of minecraft. (This was pre-1.6)

I wrote a backup program using batch and vbscript… But I don’t have the source anymore :confused:

My first “Real” project was a website for school back in 2008. Written in JS and PHP we had to parse data that was on a database the teacher had. We had full creative reign (how we presented the data) and it was really fun. I do not have the source anymore. :crying_cat_face:

I’ve written so much random stuff over the past ~5 years. Looking at my github, there was a mod downloader that I made in batch which actually worked! GitHub - simon816/minecraft
I was quite the batch pro back in the day. :smile:
One of the first things I can remember is using HTML and JS from w3schools.com, copying the examples and modifying them slightly.
A few years ago, I made an app for finding minecraft item IDs and info (Link still exists) (totally not trying to copy an ios app)

Mines was an address book for python. Pretty crap.

My first REAL project was an html scraper/parser written over the course of 36 hours, in python with the beautiful soup library, and ungodly regular expressions.
I think the script burned in the fires of hell where it belonged when my company ran out of startup capital and I got laid off.
That combined with a bash script that I wrote for project automation, increased my rate of production by about 20000%.
(I got 18 months worth of work done in about 3 weeks)
They started paying me better after that. Best job I ever had.

4 Likes

Well this is actually my first java project

Mine was a Bukkit plugin that was über-crappy and had ~0 lines of object-oriented code. Mostly copy pasted from various Stack Overflow questions.

Nowadays, and this is somewhat embarrassing, I catch myself thinking in code.

SupportGroup sg = new SupportGroup();

Argh… did it again.

But then a lot of people started from bad hMod/Bukkit plugins. Right?

1 Like

I guess so by the sheer amount of Bukkit plugins that aren’t in the slightest OO

1 Like

The first program I wrote was a Magic Square verifier. It’s in Portuguese, but I think you can get the idea… here.

It’s pretty lousy, but it was 5 years ago so… :blush:

I frequently catch myself thinking in arrays, objects, foreach blocks, switches, and iterator loops.

2 Likes

Zenity and apt-get dependencies… init.d… This was an ubuntu/debian only bootstrapper.

My first “real” language was Java. Before, I prgrammed in .NET and BlitzBasic(actually cool :smile:). I don’t have the early programs, they were really bad crap!
I can only tell you something about Android App projects. For example my first app measured the height of your position via GPS. And my first public app is this (not English, because it is an app for the people of my school. It is an app that shows you the “substitute teacher plan” of the school. I don’t know if this is the right English word). Of course it isn’t the first version :laughing:, I update it nearly every week.