RAPTOR Vs peudocodice
Per chi non ha nessuna esperienza sulla programmazione o e' alle primissime armi e --per adesso non vuole spendere tempo/energia per imparare sintassi e semantica di un linguaggio di programmazione reale(cosa che puo' fare piu' in la ) ma invece --vuole concentrarsi completamente sulla sostanza algoritmica e a dei concetti fondamentali e comuni che valgono in tale ambito (ossia prevalentemente per l' analisi e progetto di un programma(per l' implementazione per ora ci pensera' RAPTOR) cioe' tutti quelli aspetti che prescindono dal linguaggio utilizzato --che ha a che fare solo nella fase della codifica del codice--) eccovi un software free, che si puo' usare al posto del peudocodice,
RAPTOR e in compagnia di tutti i testi come
http://www.pearsonhighered.com/educator ... 41636.page (ottimo testo propedeutico che gia' usa oltre a C++, Visual Basic, Java, JAvascript, Python anche raptor dal Cap 3 in poi ) o simili che usano pseudocodice :
Raptor is a simple-to-use problem solving tool that enables the user to generate executable flowcharts. Raptor was written for students(designed specifically to help students visualize their algorithms and avoid syntactic baggage) being introduced to the computing discipline in order to develop problem solving skills and improve algorithmic thinking.
Raptor programs are created visually and executed visually by tracing the execution through the flowchart. Required syntax is kept to a minimum. Students prefer using flowcharts to express their algorithms, and are more successful creating algorithms using RAPTOR than using a traditional language or writing flowcharts without RAPTOR.
Raptor Reference
Math
Math Operators
-
unary minus
^ , **
exponentiation
*
multiplication
/
division
rem, mod
remainder
+
addition
-
subtraction
Basic Math Functions
abs - absolute value
ceiling - ceiling function (round up)
e - returns the value of e (base for natural logarithms)
floor - floor function (round down)
log - natural logarithm function
max - maximum of two values
min - minimum of two values
pi - returns the value of pi
powermod - used for public key encryption / decryption
random - returns a random value between [0.0,1.0)
sqrt - square root
Trigonometric Functions
arccos - arc cosine
arccot - arc cotangent
arcsin - arc sine
arctan - arc tangent
cos - cosine
cot - cotangent
sin - sine
tan - tangent
Program Control
Relational Operators
= equal to
> greater than
< less than
!= not equal to
/= not equal to
>= greater than or equal to
<= less than or equal to
Boolean Operators
and - logical 'and' (true if expressions on both sides true, otherwise false)
not - logical 'not' (makes a true expression false, false expression true)
or - logical 'or' (true if expressions on either or both sides true, false if neither true)
xor - logical 'xor' (true if expressions on either side are different)
clear_console - clears the MasterConsole window
delay_for - delay for x number of seconds
Raptor Graphics
Available colors
Black, Blue, Green, Cyan, Red, Magenta, Brown,Light_Gray, Dark_Gray, Light_Blue, Light_Green, Light_Cyan, Light_Red, Light_Magenta, Yellow, White
Available fill values
Filled, Unfilled
True, False
Yes, No
Mouse button values
Left_Button , Right_Button,
RaptorGraph Functions (return a value)
Closest_Color, Get_Font_Height, Get_Font_Width, Get_Key, Get_Key_String, Get_Max_Height, Get_Max_Width, Get_Mouse_X, Get_Mouse_Y, Get_Pixel, Get_Window_Height, Get_Window_Width, Is_Open, Key_Down, Key_Hit, Mouse_Button_Down, Mouse_Button_Pressed, Mouse_Button_Released, Random_Color, Random_Extended_Color
RaptorGraph Calls
Clear_Window, Close_Graph_Window, Display_Text, Display_Number, Draw_Arc, Draw_Box, Draw_Bitmap, Draw_Circle, Draw_Ellipse, Draw_Ellipse_Rotate, Draw_Line , Flood_Fill, Freeze_Graph_Window, Load_Bitmap, Open_Graph_Window, Wait_For_Key, Wait_For_Mouse_Button, Get_Mouse_Button, Put_Pixel, Set_Font_Size, Set_Window_Title, Unfreeze_Graph_Window, Update_Graph_Window
Arrays
Array Operations
Length_Of - returns length of a one-dimensional array
[ ] - indexing: selects a single element in an array
To_Character - returns a character given its numeric ASCII value
To_ASCII - returns the numeric ASCII value for a given character
Strings
String Operations
+ - Concatenation
Length_Of - returns length of a string expression
[ ] - indexing: selects a single character in a string (references ASCII code)
Variable Type Queries
Boolean Functions
Is_Array, Is_Number, Is_String, Is_2D_Array
Sound
Sound Calls
Play_Sound, Play_Sound_Background, Play_Sound_Background_Loop
Files
File Calls
Redirect_Input - starts or stops the use of a file as input source
Redirect_Output - starts or stops the use of a file as the output source
-------------------------------------------------------------------------------------------
un po di " hacking" su : come installare .NET per arch amd64
-------------------------------------------------------------------------------------------
1.
RAPTOR e' fatto per girare su Windows con .NET quindi servirebbe
a) o una partizione con Win
b) o una macchina virtuale con Win
c) oppure in alternativa si potrebbe usare anche attraverso
Wine
la terza opzione su una Lucid (10.04 LTS) con installati wine1.3 e mono-complete (2.6.7-3ubuntu1~dhx1)
wine dava il seguente errore( serve la piattaforma .NET):
Codice: Seleziona tutto
wine: Install Mono for Windows to run .NET 2.0 applications.
2.
Se il sistema e' a 32bit nessun problema .NET2.0 e mono si installerebbero(per risolvere il caso
winetricks mono28 guarda piu' giu' ) con 2 comandi
(in caso non si abbia gia' winetricks :
sudo apt-get install winetricks )
il secondo comando da questo errore causa non aggiornamento del hardcoded link in "winetricks mono28" dal sito di novell ; guarda il commando wget piu' giu'
Codice: Seleziona tutto
harrykar@harrysas:~$ winetricks mono28
Executing w_do_call mono28
Executing load_mono28
Executing mkdir -p /home/harrykar/.cache/winetricks/mono28
Downloading http://ftp.novell.com/pub/mono/archive/2.8.2/windows-installer/1/mono-2.8.2-gtksharp-2.12.10-win32-1.exe to /home/harrykar/.cache/winetricks/mono28
--2015-08-22 13:43:49-- http://ftp.novell.com/pub/mono/archive/2.8.2/windows-installer/1/mono-2.8.2-gtksharp-2.12.10-win32-1.exe
Resolving ftp.novell.com... 130.57.1.44
Connecting to ftp.novell.com|130.57.1.44|:80... connected.
HTTP request sent, awaiting response... 404 Not Found
2015-08-22 13:43:50 ERROR 404: Not Found.
------------------------------------------------------
Downloading http://ftp.novell.com/pub/mono/archive/2.8.2/windows-installer/1/mono-2.8.2-gtksharp-2.12.10-win32-1.exe failed
------------------------------------------------------
nel caso il sist e' a 64 bit (.NET (=mono) non e' installabile (in Wine) in tali sist. senza metter mano)
per partire da una condizione iniziale comune cancelliamo la dir ~/.wine (o meglio --in caso si abbia gia' installato altre app. ecc-- "camuffiamo" la dir /.wine cambiando il nome : per esempio .wine_OLD)
Codice: Seleziona tutto
export WINEARCH="win32"
winetricks dotnet20
wget http://download.mono-project.com/archive/2.8/windows-installer/9/mono-2.8-gtksharp-2.12.10-win32-9.exe
wine mono-2.8-gtksharp-2.12.10-win32-9.exe
http://askubuntu.com/questions/69744/ru ... ns-for-win#
http://askubuntu.com/questions/231587/i ... it-machine
------------------------
Install raptor
------------------------
scarica l'eseguibile da
http://raptor.martincarlisle.com/raptor_2014.msi
o
http://raptor.martincarlisle.com/raptor ... signed.msi
fai l' installazione di raptor in .wine attraverso (sostituendo /path/to/ col percorso che identifica la dir ove si trova raptor_2014.msi)
o rclick su raptor _2014.msi e scegli Open with Wine Windows Program Loader
https://help.ubuntu.com/community/Wine
PS:
1. riguardo una veloce guida visiva su raptor (in inglese) si dia un occhiata
qui
2. Riguardo il corposo(823 pagine) testo/tomo
Prelude to Programming: Concepts & Design --che trovo molto ben fatto e raccomando caldamente ai novizi che hanno davanti loro tempo per svolgere il gran num di esercizi, unico suo difetto IMO il prezzaccio ; si puo' provare a trovarlo in biblioteche pubbliche comunali o piu' facilmente Universitarie--
review(in inglese)
The text continues to strive to enhance learning programming concepts and to provide students with an
enriched experience. Throughout the text, concepts build from clear and simple introductory explanations
to complex and challenging Examples and Review Exercises.
provides a language-independent introduction to programming concepts that helps students learn the following:
● General programming topics, such as data types, control structures, arrays,
files, functions, and subprograms
● Structured programming principles, such as modular design, proper program
documentation and style, and event-driven and object-oriented program
design
● Basic tools and algorithms, such as data validation, defensive programming,
sums and averages computation, and searching and sorting algorithms
● Real programming experience through the optional use of RAPTOR, a free
flowchart-based programming environment
● Data representation of integer and floating point numbers
No prior computer or programming experience is necessary.
The text is written and organized to allow flexibility in covering topics. Material is presented in such a way
that it can be used in any introductory programming course at any level.
Each concept is presented in a clear, easily understood manner and the level of difficulty builds slowly.
The What & Why sidebars give students the opportunity to think above and beyond the material in the
Examples and encourage discussion and student interaction.
The Making it Work sidebars demonstrate how concepts are applied in the real world.
Examples, Self Checks, and Review Exercises increase in difficulty from most basic to very challenging.
The Programming Challenges sections at the end of each chapter give students a chance to create longer,
comprehensive programs from scratch and, if RAPTOR is used, they can run the programs and see the results.
In the past companies hired programmers based on which language that company used for its development.
Thus, regardless of the task, the programmer wrote code in this preferred language. Today, it is more likely that
a programmer will choose a language that fits the job rather than force a given language to do a job.
A software developer must be fluent in several languages and understand how to quickly adapt to any new
language.
Therefore, it has become far more important to know the logic of writing code in any language than to focus
on a specific language.
Of course, writing a suitable program to solve a specific problem requires a good deal of knowledge about
programming concepts in general and a specific language in particular.
The purpose of this book is to present the relevant general programming concepts. Once you have mastered
the logic and structures of programming, learning a specific programming language should prove to be relatively easy.
Cheers! ;)
HArry G.T. KAr