Info Posted April 17, 2011 Share Posted April 17, 2011 Do you write your own pseudocode before any project? I'm curious Link to comment Share on other sites More sharing options...
Mobius Posted April 17, 2011 Share Posted April 17, 2011 (edited) Why use pseudo when you can use real code? Edited April 17, 2011 by Mobius Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted April 17, 2011 Moderators Share Posted April 17, 2011 Info,Often, but not always - it depends a lot on the size and complexity of the project.I more frequently use pseudo-code to tidy up once the script is running - when I look back and see that I have written some awful "spaghetti" code. Or to clear my mind about a complicated section before I start to code - although this is not always as successful as I might wish! M23 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area Link to comment Share on other sites More sharing options...
ProgAndy Posted April 17, 2011 Share Posted April 17, 2011 Pseudocode is not a bad thing, but I don't like the syntax we have to use in university. For private purpose I like using a BASIC / AutoIt-based syntax for pseudocode (including classes, namespaces ... if necessary) *GERMAN* [note: you are not allowed to remove author / modified info from my UDFs]My UDFs:[_SetImageBinaryToCtrl] [_TaskDialog] [AutoItObject] [Animated GIF (GDI+)] [ClipPut for Image] [FreeImage] [GDI32 UDFs] [GDIPlus Progressbar] [Hotkey-Selector] [Multiline Inputbox] [MySQL without ODBC] [RichEdit UDFs] [SpeechAPI Example] [WinHTTP]UDFs included in AutoIt: FTP_Ex (as FTPEx), _WinAPI_SetLayeredWindowAttributes Link to comment Share on other sites More sharing options...
Mat Posted April 17, 2011 Share Posted April 17, 2011 (edited) Drawing diagrams is much better IMO, but the way I do it is to write out all the functions just as placeholders and fill them with comments instead. Edited April 17, 2011 by Mat AutoIt Project Listing Link to comment Share on other sites More sharing options...
jvanegmond Posted April 17, 2011 Share Posted April 17, 2011 Drawing diagrams is much better IMO, but the way I do it is to write out all the functions just as placeholders and fill them with comments instead.I will pick my own variant of pseudocode any day over a sequence diagram. github.com/jvanegmond Link to comment Share on other sites More sharing options...
Mat Posted April 17, 2011 Share Posted April 17, 2011 I will pick my own variant of pseudocode any day over a sequence diagram.I will pick my own doodles over a sequence diagram any day. AutoIt Project Listing Link to comment Share on other sites More sharing options...
Richard Robertson Posted April 17, 2011 Share Posted April 17, 2011 I occasionally write what I want in English so I have a framework that I can easily drop into comments and fill in at my leisure. Link to comment Share on other sites More sharing options...
bo8ster Posted April 29, 2011 Share Posted April 29, 2011 I generally use Pseudocode to describe what I want to do before I get into the detail for a complex method or class. I find I use A3 paper and a pacer more then then the computer to do it though. Post your code because code says more then your words can. SciTe Debug mode - it's magic: #AutoIt3Wrapper_run_debug_mode=Y. Use Opt("MustDeclareVars", 1)[topic="84960"]Brett F's Learning To Script with AutoIt V3[/topic][topic="21048"]Valuater's AutoIt 1-2-3, Class... is now in Session[/topic]Contribution: [topic="87994"]Get SVN Rev Number[/topic], [topic="93527"]Control Handle under mouse[/topic], [topic="91966"]A Presentation using AutoIt[/topic], [topic="112756"]Log ConsoleWrite output in Scite[/topic] Link to comment Share on other sites More sharing options...
trancexx Posted April 29, 2011 Share Posted April 29, 2011 I usually have the full picture of what I want to do and how to do it before I start doing it. Not being a programmer and not coding anything terribly complicated ever, I have had no need to write ideas or pseudo code to paper/solid_media. I run pseudocode in my head . Even though I can imagine situations when writing it down would be more than necessary. ♡♡♡ . eMyvnE Link to comment Share on other sites More sharing options...
czardas Posted May 1, 2011 Share Posted May 1, 2011 (edited) Here's some of my pseudo code (unedited). It's about as obfuscated as it gets. expandcollapse popup"(?i)[012345679abcdefgijmnorstux ºØ^#/\^\+\-]" Root Notes [CDEFGAB] ([CDEFGAB][#|b]) [DEGAB]bb [CDFGA]X BAD PATTERNS "s" #s bs as /s ms "(m[^a])"..s 11..s s..s im7..s º7..s Ø..s RETURN VALUES "s" sus BAD PATTERNS "d" +d -d #d bd ºd "(º[^7])"d Ø..d g..d im..d º..d RETURN VALUES "d" ad = Add º7d = º7dim3 im7d = im7dim3 d = dim /d = /D BAD PATTERNS "º" +d -d #d bd ºd "(º[^7])"d Ø..d g..d im..d º..d BAD PATTERNS "a" #a ba RETURN VALUES "a" If letter /[a-g] /a = /A GOOD PATTERNS "[ijn]" mi in maj BAD PATTERNS "i" mmi GOOD PATTERNS "o" no jo [\d+-gs(im)]o OR If Stringlen > 4 Return omit GOOD PATTERNS "u" au BAD PATTERNS "u" mau º..au Ø..au [A[º|Ø]]..au must test for a first => not allow this (dd) GOOD PATTERNS "m" \Am|mm rm inm im GOOD PATTERNS "[cefg]" /"[cefg]" BAD PATTERNS b alt bb [^m]ab #b +b -b Øb BAD PATTERNS # alt b# [^m]a# ## +# -# Ø# BAD PATTERNS + alt b+ [^m]a+ #+ ++ -+ Ø+ BAD PATTERNS - alt b- [^m]a- #- +- -+ Ø- It was meant to be part of a heuristic musical chord name recognition system. Although I have abandoned the idea for the time being, looking back at it is confusing. Edited May 1, 2011 by czardas operator64 ArrayWorkshop Link to comment Share on other sites More sharing options...
Richard Robertson Posted May 1, 2011 Share Posted May 1, 2011 Does this count as pseudocode? Link to comment Share on other sites More sharing options...
Info Posted May 1, 2011 Author Share Posted May 1, 2011 (edited) Is that Google Chrome? How did you pin those tabs in the left corner? Edit: Holy shit there's a pin tab option!>!@#!@#!@#!#$@$5t35 never saw that Edited May 1, 2011 by Info Link to comment Share on other sites More sharing options...
Richard Robertson Posted May 1, 2011 Share Posted May 1, 2011 It's not my browser. I just found the screenshot. Link to comment Share on other sites More sharing options...
ProgAndy Posted May 1, 2011 Share Posted May 1, 2011 (edited) It's not my browser. I just found the screenshot.I'd like to hav the complete definition list, but the url is not accessible without an account and I don't feel like creating one. Why are there no defines in AutoIt. I want to create such code with it, too Edited May 1, 2011 by ProgAndy *GERMAN* [note: you are not allowed to remove author / modified info from my UDFs]My UDFs:[_SetImageBinaryToCtrl] [_TaskDialog] [AutoItObject] [Animated GIF (GDI+)] [ClipPut for Image] [FreeImage] [GDI32 UDFs] [GDIPlus Progressbar] [Hotkey-Selector] [Multiline Inputbox] [MySQL without ODBC] [RichEdit UDFs] [SpeechAPI Example] [WinHTTP]UDFs included in AutoIt: FTP_Ex (as FTPEx), _WinAPI_SetLayeredWindowAttributes Link to comment Share on other sites More sharing options...
Richard Robertson Posted May 1, 2011 Share Posted May 1, 2011 I'd love to see the defines as well. I've got no idea what the program actually does but it got 100% scores. Link to comment Share on other sites More sharing options...
czardas Posted May 1, 2011 Share Posted May 1, 2011 (edited) Does this count as pseudocode?I thought it was real code, but it just made me think of something. If you could define keywords, and introduce syntax, in some way that allowed the code to be easily interpreted as natural language; then you could write something that others would perceive as being a story. Only if you compiled it, would it become a program. If someone asks what you are doing, depending on who asks, you could pretend you are writing a story. I'm still trying to think of a purpose for this crazy idea. Edited May 1, 2011 by czardas operator64 ArrayWorkshop Link to comment Share on other sites More sharing options...
Mat Posted May 1, 2011 Share Posted May 1, 2011 Holy shit there's a pin tab option!>!@#!@#!@#!#$@$5t35 never saw thatI posted about it AutoIt Project Listing Link to comment Share on other sites More sharing options...
bo8ster Posted May 2, 2011 Share Posted May 2, 2011 That is some really bad code, reminds me of the How to Write Unmaintainable Code article. Post your code because code says more then your words can. SciTe Debug mode - it's magic: #AutoIt3Wrapper_run_debug_mode=Y. Use Opt("MustDeclareVars", 1)[topic="84960"]Brett F's Learning To Script with AutoIt V3[/topic][topic="21048"]Valuater's AutoIt 1-2-3, Class... is now in Session[/topic]Contribution: [topic="87994"]Get SVN Rev Number[/topic], [topic="93527"]Control Handle under mouse[/topic], [topic="91966"]A Presentation using AutoIt[/topic], [topic="112756"]Log ConsoleWrite output in Scite[/topic] Link to comment Share on other sites More sharing options...
Richard Robertson Posted May 2, 2011 Share Posted May 2, 2011 bo8ster, which code are you referring to? Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now