Wiki source for PuppySchoolProgramming


Show raw source

[[HomePage]] > [[ComponentHowTo Components and HowTos]] > [[HowToProgramming Programming]]
>>@@{{image url="http://i1200.photobucket.com/albums/bb335/cructacean/h3.png" title="Puppy School - coming soon" alt="Puppy School"}}@@>>
@@ //Welcome to **Puppy [[http://en.wikipedia.org/wiki/Hacker_%28programmer_subculture%29 Hacker]] School**. {{color text="Crackers" c="green"}}[[http://www.hackforums.net/ go here]]@@
<< Help on [[http://www.murga-linux.com/puppy/viewtopic.php?p=594730#594730 the forum]], [[ChatRoom IRC chatroom]] or [[PuppyPhone soft phone]]//

===Tools===
[[Eclipse]] Ide
[[PuppySchoolHackingHomework Advanced Language resources]]
[[http://www.murga-linux.com/puppy/viewtopic.php?p=613319#613319 Record Desktop]] Tutors resource and code tutorial<<

{{color text="New" c="red"}} [[http://en.wikiversity.org/wiki/Programming Wikiversity]]
[[http://www.udacity.com/overview/Course/cs262/CourseRev/apr2012 7 week course]] from udacity
[[http://www.wibit.net/curriculum/the_basics/introduction_computer_programming Introduction to programming]]
[[http://www.khanacademy.org/#computer-science Computer Science]] at Khan Academy

{{image url="http://i1200.photobucket.com/albums/bb335/cructacean/rel2.jpg" title="love revolved" alt="love revolved"}}
**Hacker School distros for advanced Puppys**
[[http://www.murga-linux.com/puppy/viewtopic.php?p=604710#604710 SalukiPy]] Puppy Programming Puplet {{color text="New" c="red"}} [[http://raspberrypy.tumblr.com/ Supporting RaspberryPy blog]] from antiloquax and Lobster
[[http://www.murga-linux.com/puppy/viewtopic.php?p=601949#601949 roar-ng and Subito GNU/Linux]]
[[http://www.murga-linux.com/puppy/viewtopic.php?t=69475 Pussy]]

**My First Bash**
[[http://youtu.be/PXP1IiCjdE0 First Bash Script]] video
//Change the permissions of a script to run. Right click and change permissions//

**My First Variable**
Introduces **input** (the read command)
and **variables**
The read command changes the variables each program run

%%(language-ref)
#!/bin/sh
echo "enter two numbers"
read a b
c=$(($a+$b))
echo "$a + $b = $c"
# or
let c="$a+$b"
echo "$a + $b is $c"
%%

**Instant Bash**

3 lessons starting with a Puppy style 'Hello world'
%%(language-ref)
#! /bin/bash
# 16 Dec 2011 Lobster
# Example 1 hello world example

xpupsay "hello world"
xpupsay "puppy power"%%
[[http://www.murga-linux.com/puppy/viewtopic.php?p=590114&search_id=1857898931#590114 Speak Puppy]] a first programming effort
[[http://youtu.be/C3SatsuOd-0 Supporting video tutorial]]
[[http://youtu.be/p3v_cr5o3JE Example usage video]] Buddhist cyber shrine

{{color text="New" c="red"}} [[http://www.murga-linux.com/puppy/viewtopic.php?p=622297#622297 Problem and solution]] Below for code
%%
#!/bin/bash

# Randomly changes the wallpaper at fixed time intervals

INTERVAL=10 # in seconds

while true; do
sleep $INTERVAL
WALLPAPER=`ls /usr/share/backgrounds | sort -R | head -1`
set_bg "/usr/share/backgrounds/$WALLPAPER"
done
%%
Adjust the time interval to your needs, save the script as "randomwallpaper" to /root/Startup and make it executable.
Now click on it.
To stop the script, open terminal and type:
%%
killall randomwallpaper
%%

**More Bash Script**
[[http://www.murga-linux.com/puppy/viewtopic.php?p=320504#320504 The Text-User Interface]]
[[http://www.linuxconfig.org/Bash_scripting_Tutorial Have a bash]]
[[http://tldp.org/LDP/abs/html/ Advanced Bash-Scripting Guide]]

**Bash Script GUI**
[[http://www.murga-linux.com/puppy/viewtopic.php?p=185153&search_id=628951850#185153 Simple GUI example]] to hack from Lobster
[[http://www.murga-linux.com/puppy/viewtopic.php?p=274035#274035 GTK with Bash script]] may require forum registration
[[http://www.murga-linux.com/puppy/viewtopic.php?p=569191#569191 Advanced GUI server]]

**Bacon with Barry Kauler**
Bacon is a BASIC language to C converter written in Bash Script
[[http://bkhome.org/bacon/ Bacon Tutorials]]
[[http://www.murga-linux.com/puppy/viewtopic.php?p=361627#361627 another slice]] may need forum registration

**Vala**
Requires devx. [[ValaGenieintro Puppy Vala and Genie Intro]]

**Smalltalk**
Pharo is an implementation of Squeak, which is a unique version of the programming language 'Smalltalk'
[[http://www.pharo-project.org/home Download and click on the pharo zip file]]
run the shellscript ""Pharo-1.3-13315-OneClick.app"" you find in the folder/directory
Pharo is now running
[[http://youtu.be/9sAnByuuRRo Now use the built in tutorial]]

[[http://www.murga-linux.com/puppy/viewtopic.php?p=603788#603788 Squeak and Scratch]]

**Pascal**
[[http://www.murga-linux.com/puppy/viewtopic.php?p=582779#582779 Because you're Wirth it]]

**Python**
{{color text="New" c="red"}} [[PythonLearn Learn Python]] from Puppy School has its own page

**C and ""C++""**
[[https://www.wibit.net/?view=course&courseID=2 Programming in C]]
{{color text="New" c="red"}} [[http://www.joelonsoftware.com/articles/fog0000000319.html Back to Basics]] with Joel
[[http://www.caveofprogramming.com/c/basic-c-programming-test-your-knowledge/ Test your knowledge of the absolute basics of C++]]

**[[http://labs.codecademy.com/# Ruby]] with code academy**
Learn to code in Python. Ruby and Javascript from your browser . . .

**Maths and more**
[[http://projecteuler.net/problems Project Euler]] programming to solve maths problems


**more languages**
~see [[HowToProgramming How To Program]]

**Compiling**
The [[Devx]] programming developer SFS is required for Puppy compiling programming for anything beyond Bash script
{{color text="New" c="red"}} [[http://youtu.be/LDe54Z8hlQc Getting the Puppy Development system video]] Devx in Puppy 5.3.1
Go to Slickpet / SFS tab and click on the GNU compiler button
[[compiling]] in C and other languages is available
[[http://www.murga-linux.com/puppy/viewtopic.php?p=531645#531645 Compiling]] (forum registration required)

**New Run**
Process for a new run from DVD booting

First Preparing
1. backup html bookmarks (onto HD)
2. move any essential files to hard disk
3. download and burn ISO

Now first run
1. use 'puppy pfix=ram' as the boot command (start typing when **boot:** appears on screen) I do this on first boot but is not required for new users
2. Turn on firewall from icon bar bottom right, left clicking runs wizard
3. Do a save after initial set up, I now do max 4GB saves
4. Click on 'Setup' top row of icons for tweaking
5. Use the 'connect' icon. Ethernet is auto connected.
6. In Rox options/thumbnails/show images - I prefer to see images in folders
7. Add my own backgrounds from Hard Drive (usr/share/backgrounds)
8. Change icons. Adjust the style of the clock with Menu -> General Utilities -> PupClockset manager.
9. Put on pup ad blocker, import bookmarks

>>**Hardware**
[[PARM Coming soon . . .]]

**Create your own Linux Distribution** //coming soon . . .//
[[http://youtu.be/yQIqwy7_trs video tutorial]] with Sneaky Linux

Remastering
Before you remaster, you need to

1. rename /usr/sbin/xorgwizard to /usr/sbin/xorg-setup
2. copy the attached xorgwizard into /usr/sbin. ( right-click -> Save As) http://diddywahdiddy.net/Puppy500/xorgwizard

What is happening is that on first boot, the attached xorgwizard runs and Lucid boots to the desktop, then it renames xorg-setup to xorgwizard so that users can run xorgwizard. Sneaky, huh?

You also need to change the permissions on /root/Startup/fullstart. You could do that during the remastering process when it gives you a chance to adjust files in /root. The way I do it is to right-click and choose Permissions. So if the name fullstart turns green that means the permissions are correct for it to run on first boot.

creating a md5sum
# md5sum Lucid_Tmxxine-v1.iso > md5sumtxt
[[http://tmxxine.com/tmx525/ remastering example]]

[[http://puppylinux.info/topic/getting-started Woof2]] beyond remastering {{color text="Advanced " c="red"}}
>>


---
---
---
---
---
---
---
---
---
---
---
---
---
---
---
---
----
==Categories==
CategoryTutorial
Valid XHTML :: Valid CSS: :: Powered by WikkaWiki