Category Archives: Uncategorized

Waarom hebben we 8 bits nodig om een symbool op te slaan?

Op dit moment ben ik bezig met het schrijven van een boek. In dit boek schreef ik een heel kort stukje over het geheugen van computers en toen ik dat geschreven had, vroeg ik mijzelf af of ik het zelf eigenlijk wel goed begreep. Daarom besloot ik iets meer over computergeheugens te weten te komen. Ik wilde o.a. kunnen uitleggen waarom we 8 geheugenplaatsen gebruiken om 1 symbool in het geheugen van een computer op te slaan. Het resultaat staat hieronder.

Het boek dat ik aan het schrijven ben is mijn tweede boek. Het is bedoeld voor studenten van scholen en universeiten en geeft een eenvoudige inleiding in het programmeren. Het boek is nog niet uitgegeven. Als je op zoek bent naar een boek over programmeren met LiveCode, kun je eens kijken naar Programming LiveCode for the Real Beginner.

IBM, in 1924 voortgekomen uit de Computing Tabulating Recording Company, dat apparaten maakte om berekeningen te vereenvoudigen, produceerde in 1944 de MARK I, de eerste automatische rekenmachine. MARK I was zo groot als een flinke huiskamer en gebruikte geen micro-elektronica maar radiobuizen en andere elektrische onderdelen. Van geheugen zoals die in hedendaagse computers gebruikt worden, was nog geen sprake.

MARK IIn 1968 introduceerde Hewlett-Packard een apparaat dat je de eerste personal computer zou kunnen noemen, de HP 9100A. Dit apparaat kon ongeveer hetzelfde als de gemiddelde zakcalculator in het begin van de jaren 1990 kon. De HP 9100A had in totaal 8 kilobyte werkgeheugen. In 1976 kwamen Steve Jobs en Steve Wozniak met de Apple I. Om de productiekosten laag te houden, kozen ze er voor om eveneens slechts 8 kilobyte werkgeheugen in te bouwen. In 1977 begon Commodore met de verkoop van de PET 2001, die standaard 4 kilobyte geheugen tot zijn beschikking had. Omdat de PET de eerste complete computer met toetsenbord en beeldscherm was, zou je dit de eerste echte home computer kunnen noemen. Pas eind jaren 1970 en vooral in de jaren 1980, nam de hoeveelheid geheugen die in computers werd ingebouwd, toe. Bekende modellen zijn de C64, de Macintosh 128K en de ATARI ST. De ATARI had minimaal 512 kilobyte geheugen.

De kleine hoeveelheid geheugen brengt natuurlijk beperkingen met zich mee. Dit hangt samen met het aantal verschillende symbolen (letters, cijfers en leestekens) dat je wilt kunnen gebruiken. Als je bijvoorbeeld slechts 2 symbolen wilt gebruiken, een 0 en een 1, dan heb je slechts 1 bit (een plaats in het geheugen) nodig. Dat lijkt merkwaardig, maar omdat een bit aan of uit kan zijn, kun je alleen al door hem aan of uit te zetten een waarde aan hem toekennen, dus bijvoorbeeld 0 of 1.  Als de bit uit is, geef je hem de waarde 0 en als hij aan is de waarde 1. Voor 4 verschillende waarden heb je slechts 2 bits nodig.

00 alle bits uit (bijvoorbeeld 0)
01 een bit aan (1)
10 de andere bit aan (2)
11 twee bits aan (3)

Het probleem is dat je meer bits nodig hebt naarmate je meer symbolen tot je beschikking hebt. Als je meer dan 4 (en maximaal 8) verschillende waarden wilt kunnen weergeven, heb je 3 bits nodig:

000 (0)
001 (1)
010 (2)
011 (3)
100 (4)
101 (5)
110 (6)
111 (7)

Als je alle 26 (hoofd)letters van het alfabet wilt gebruiken, heb je voor elk symbool 5 bits nodig:

00000 (A)
00001 (B)
00010 (C)
etc.

en als je ook nog 26 kleine letters en 10 cijfers wilt kunnen gebruiken, dus in totaal 62 verschillende symbolen, dan heb je voor ieder symbool 6 bits nodig. Voor het gebruik van extra symbolen heb je dus voor ieder symbool meer bits nodig. Daardoor neemt het benodigde geheugen voor het weergeven van de symbolen exponentieel toe. Vanaf eind jaren 1960 werkten de meeste computers met 128 verschillende symbolen en vanaf eind jaren 1970 met 256 verschillende symbolen. Daarvoor zijn 7 respectievelijk 8 bits per symbool nodig. Het aantal bits dat nodig is om een symbool in het geheugen op te slaan noemen we een byte.

Voordat iemand de termen bit en byte bedacht, gebruikten we voor een rijtje eenen en nullen de term “woord”. Als je een rijtje binaire code, bijvoorbeeld 00000 00100 10010 00000 achterelkaar ziet, is dat wel begrijpelijk. De in binaire code weergegeven symbolen worden van elkaar gescheiden door spaties en zo krijgen we iets wat op woorden lijkt. Ook nu noemen we dergelijke door spaties van elkaar gescheiden codes woorden, ook als ze op een andere manier worden weergegeven, bijvoorbeeld  EF EE   00 36 00 A0 00 A8 etc.

Het aantal geheugenplaatsen dat je nodig hebt om een bepaald aantal symbolen weer te geven, kun je nu berekenen. Om 128 symbolen weer te kunnen geven, heb je 128*8=1024 bits nodig. Aangezien 8 bits gelijk is aan 1 byte, is 1024 bits gelijk aan 128 bytes. Als we de volledige ASCII tabel 4 keer in het geheugen zetten, hebben we 1024 bytes nodig. Omdat dit ongeveer gelijk is aan 1000, noemen we dit een kilobyte. Het is bij het rekenen met bits en bytes handiger om van eenheden van 1024 dan van 1000 uit te gaan.

Aangezien elk symbool 1 byte in het geheugen nodig heeft, kunnen computers met 8 kilobyte geheugen  dus maximaal

8 kilobyte geheugen * 1024 bytes = 8192 symbolen

onthouden. Als je dat geheugen moet gebruiken voor zowel een programma als de variabelen die door dat programma gecreëerd worden, dan zijn de mogelijkheden nogal beperkt, vooral vergeleken met hedendaagse computers. Deze tekst, bijvoorbeeld, zou al ruim de helft van het beschikbare geheugen in beslag nemen.

The Book “Programming LiveCode…” on the World Map

Where do we sell the book Programming LiveCode for the Real Beginner? You can see it in this map. Bright red means highest sales, bright blue means lowest sales and white means that no data are available.

wereldkaart ingevuldThis map might also indicate where LiveCode is the most popular. Don’t be fooled by the red colour all over North America: The US and Canada are good for approximately half of all sales together, while Europe accounts for almost all of the remaining 50% and all other countries for approximately 5%.

We believe this doesn’t only give some insight into the requirements of our own marketing strategy, but probably also RunRev’s lack thereof. Especially in South America, there is a big market yet to be developed.

New Sales Channels for Programming Livecode Book

In a few days, we will be shipping copies of my book Programming LiveCode for the Real Beginner again. If you don’t want to wait long, this is the time to order your copy. If you order it now, We’ll be shipping it in a few days and you’ll get it within 10 days (depending on your location). Go to http://livecodebeginner.economy-x-talk.com/ for more info.

We have added TrialPay as a payment option. This means that you can pay with credit card again, without having to use PayPal. If available, you can order an alternate product and receive the book for free or you choose the “rather pay” option and pay for the book. (Currently, TP is unavailable in some countries; we try to fix this). If you’re in the Euro zone, you might want to do a bank transfer.

Another new sales channel is Lezerspunt.nl. Although this is a Dutch website, they ship all over the world. Currently, this is the best option if you are in the Netherlands and want to use iDeal. (If you are in a different country, you can use PayPal). If you click on this link http://qery.us/3z3 you will go directly to the display page for my book in the Lezerspunt store. A picture of the website follows below.

 

Impression of Lezerspunt.nl

Impression of Lezerspunt.nl

After ordering your book, make sure to keep an eye on your mail box (and possibly spam box). We will send you an e-mail, asking you to confirm your postal address. If you don’t confirm your address, we can’t send you your book. Please, make sure that PayPal, TrialPay and your credit card company have your correct e-mail address, phone number and postal address. They will forward this information to Economy-x-Talk and if any information is incorreect, your book may not arrive.

I know that many people are currently studying the book. If you have any questions, you can ask at http://livecodebeginner.economy-x-talk.com/qa/ where you can also discuss subjects with fellow “students” and if you’re lucky I’ll answer your questions myself.

Programming LiveCode…

Now that the second print run of my book is being shipped, I’d like to write a few words. Last week, we sent almost 20 books all over the world.

I would like to ask everyone, again, to make sure that you provide us with a correct e-mail address when you order the book. Three people ordered the book with false contact information and it took a tremendous effort to find out who those people are and where they live. Please, make sure PayPal, your credit card company and your bank have your correct e-mail (if applicable), name and address and make sure to check this before, and not after, placing your order.

When you receive the book, please fill out the questionnaire at http://livecodebeginner.economy-x-talk.com/survey/ . Your feedback is very important, because we use it to improve the book and our services. The questionnaire contains questions that we really need you to answer, even if you decide not to buy it. Another place for feedback is our Q&A website at http://livecodebeginner.economy-x-talk.com/qa/ . Here you can post your questions and comments and discuss the book with other readers.

One issue that has become apparent from the survey is the price perception. There is little we can do about the price, because it just happens to be the total cost of printing and packaging the book, plus all taxes and postage and a minimal margin. However, we have made it easier to get a discount. From now on, we will apply a discount to any order of 10 books or more. The discount is at least 5 euro per book. User groups, book shops and schools always get a discount, if they order more than 1 book (note that all books must be sent to one single address). Contact us for a quote.

I will say more about the survey in another e-mail. I suppose there are people on this mailing list who would like to read some answers. For now, additional general info about the book can be found at http://livecodebeginner.economy-x-talk.com/ .

N.B. You may get a free copy by liking Programming Livecode… on Facebook.  The URL is https://www.facebook.com/LiveCode.Beginner and as soon as we have 1000 ´likes’ we’ll raffle off 10 copies.

Strõm Flow Chart Software Project Updated!

flow screenshotThe Strõm Flow Chart Software Project got updated! Version 1.2.2 of the flow chart software program should fix an annoying bug, which would show an error dialog every now and then. Additionally, we are preparing the Strõm Flow Chart Software Project for a big update. To make this possible we need to make some small changes in advance. We have started implementing these changes in 1.2.2 and will gradually complete the adjustments. When 2.0 arrives, you will be able to convert documents saved with 1.2.2 or later only. Therefore, we recommend everyone updating to the latest version of Strõm  now! Strõm 1.2.2 is a free update for current license holders!

More info at: http://flowproject.economy-x-talk.com/

Book ‘Programming LiveCode for the Real Beginner’ Is Available Again!

The first print of the book “Programming LiveCode…” sold out in just over a month. Everybody who took an interest in the book was asked to do the survey at http://livecodebeginner.economy-x-talk.com/survey/ (which you can still fill out if you want) and that made it clear that we are doing things pretty much the right way. So, we’ve decided to print more books, after making a few small corrections.

Programming LiveCode for the Real Beginner, by Mark Schonewille

Programming LiveCode for the Real Beginner, by Mark Schonewille. Front and back sides of the book. ISBN not confirmed yet.

I haven’t changed much because I want teachers and students to be able to use the two prints next to each other. Nonetheless, I went through my book once more and corrected a few dozens of small typos. Where possible, I improved any confusing phrases. You can find the most important changes at http://qery.us/3xy . I’ll be extending the list of errata during the next few weeks.

Besides corrections, the new print has a slightly heavier soft cover and a better index. If you still have any comments or questions while reading the book, you can post them on our Q&A site at http://livecodebeginner.economy-x-talk.com/qa/ .

An important change, partly due to the survey results, is the minimum order size that qualifies as a bulk order. From now on, if you order at least 10 books, you may qualify for a big discount (this used to be 25 books). Contact me off-list for more information.

If you bought the book recently, we’ll be shipping it within a few days. Books purchased after today will be shipped within 2 weeks. DHL needs at most 3 weeks to deliver the package, while you should normally get it within 1 week after we ship it.

More info about the book can be found at http://qery.us/3xz.

LiveCode Meeting in Breda, the Netherlands

On 20st July 2013, eHUG organised a meeting of LiveCode users in Breda, the Netherlands. This was the second meeting dedicated to LiveCode, one year after the first meeting. There were 10 participants from Belgium, the Netherlands and Switzerland. We had a good time, drinking coffee and juice, and eating Swiss chocolates.

meeting1

Karin, an IT pro who is just starting with LiveCode, showed her one of the first iOS apps she made. Clicking on the body parts in a diagram of a human body, one gets access to information from a SQLite database. By Marc’s request, Jan showed Marco two ways to animate the sliding in and out of panels on iOS. Following up on Jan, Björnke demonstrated sliding groups in BvG Docu. John showed a game, which is used to teach accounting to students. We also discussed some problems, which he encountered while working with MySQL in connection to the game.

meeting2

All other participants told us about the way they use LiveCode and we had long chats about scripting problems and possible solutions. The question that always comes back is: how many use LiveCode. Conclusion: wo don’t know. Perhaps there are up to 3500 commercial license holders. We didn’t have enough time to do everything we planned for. Next time, we’ll still have plenty to talk about.SAMSUNG DIGITAL CAMERA

We also raflled off a copy of the TopXNotes software and the eBook Take Control of Mountain Lion, written by Matt Neuburg.

eHUG Organizes LiveCode Meeting in the Netherlands

Beste allemaal,

Aanstaande zaterdag 20 juli van 12:00h. tot ongeveer 16:00h. houden we een LiveCode-bijeenkomst. Deze bijeenkomst wordt gehouden in Breda. Het adres is:

Coffee & Cream
Willemstraat 18
4811 AL Breda
Nederland

We kunnen gebruik maken van een grote tafel en ons is toegezegd dat het er rustig zal zijn (al is dat natuurlijk enigszins relatief). Coffee & Cream zit vlak bij het station in het centrum van Breda. Dit http://goo.gl/maps/RMzAV is een linkje naar Google Maps. Er is WIFI in de zaak en er zijn 1 of 2 stopcontacten. Ik raad je echter wel aan om te zorgen dat de batterij van je laptop is opgeladen, mocht je die mee willen nemen.

We verwachten ongeveer 10 deelnemers uit drie verschillende landen. Er zullen drie of vier korte presentaties worden gehouden. Tot de onderwerpen zullen waarschijnlijk behoren: MetaCard in het technisch onderwijs; een spel om te leren boekhouden; een overzichtje van een aantal kleinere projecten; en GUI-ontwerp voor iOS. Er zal zaterdag ook tijd zijn om gewoon vragen te stellen.

Er zal een e-book uit de Take Control serie worden verloot. De titel van het boek is Take Control Of Using Mountain Lion, geschreven door Matt Neuburg. Ook zal het softwarepakket TopXNotes worden verloot.

Er zijn nog twee exemplaren van de eerste druk van het boek Programming LiveCode for the Real Beginner beschikbaar. Deze kunnen ter plekke worden aangeschaft voor 25 euro i.p.v. 32 euro. Je kunt ook nog 2 weken wachten en een exemplaar van de tweede druk bestellen voor 32 euro.

Als je nog vragen hebt, dan kun je per e-mail of telefoon contact met me opnemen.

Nog even een paar nuttige links.
Nederlands LiveCode forum:
http://nl.runrev.info/
eHUG op Facebook:
https://www.facebook.com/groups/AUG.eHUG/
LiveCode gebruikers op Facebook:
https://www.facebook.com/groups/runrev/
Mijn Twitter account:
http://twitter.com/xtalkprogrammer

Dear all,

This Saturday, 20 July, from 12:00 until approximately 16:00PM, we will have our LiveCode meeting. The meeting is in Breda. The address is:

Coffee & Cream
Willemstraat 18
4811 AL Breda
Nederland

We can use a big table we have been promised a relatively quiet place. Coffee & Cream is close to the railway station in the city centre. Here’s a link http://goo.gl/maps/RMzAV to Google Maps. WIFI is available and there are 1 or 2 power outlets. However, it is recommended to make sure that the battery of your laptop is fully charged if you decided to take your laptop with you.

We expect approximately 10 participants from three different countries. there will be three or four brief presentations. Possible subjects are: Metacard in technical education; a game to learn accounting; an overview of a number of smaller projects; and GUI design for iOS. You will also get an opportunity to ask questions.

A book from the Take Control series will be raffled off. The title of the book is Take Control of Using Mountain Lion, written by Matt Neuburg. Additionally, we will raffle off a copy of the TopXNotes software.

Currently, two copies of the first print of the book Programming LiveCode for the Real Beginner still remain. These can be purchased on location for 25 euro instead of 32 euro. Alternatively, you can wait 2 weeks and order a copy of the second print for 32 euro.

If you have any more questions, you can contact me by e-mail or phone.

Following are a few useful links.
Dutch LiveCode forum:
http://nl.runrev.info/
eHUG on Facebook:
https://www.facebook.com/groups/AUG.eHUG/
LiveCode users on Facebook:
https://www.facebook.com/groups/runrev/
My Twitter account:
http://twitter.com/xtalkprogrammer

Liebe Leute,

An diesem Samstag gibt es das LiveCode-Treffen. Dieses Treffen findet statt in Breda ab 12:00U. bis ungefähr 16:00U. Die Adresse ist:

Coffee & Cream
Willemstraat 18
4811 AL Breda
Nederland

Wir dürfen einen grossen Tisch in der Mitte benutzen und man hat versprochen dass es relativ ruhig sein wird. Coffee & Cream befindet sich in der Nähe des Bahnhofs in der Stadtmitte. Dieser Link http://goo.gl/maps/RMzAV auf Google Maps zeigt die genaue Stelle. Es gibt WIFI und es gibt 1 oder 2 Steckdosen. Ich möchte dir jedoch empfehlen den Akku deines Laptops voll zu laden wenn du es mitnehmen möchtest.

Wir erwarten ungefähr 10 Teilnehmer aus 3 unterschiedlichen Ländern. Es wird drei oder vier Präsentation geben. Zu den möglichen Themen gehören: MetaCard im technischen Unterricht; ein Spiel das hilft beim lernen der Buchhaltung; ein übersicht mehrerer kleinen Projekte; und GUI-Entwurf für iOS. Es wird auch eine Möglichkeit geben Fragen zu stellen.

Ein E-Book aus der Take Control Serie wird verlost. Der Titel ist Take Control of Using Mounting Lion, geschrieben von Matt Neuburg. Ausserdem wird die Software TopXNotes verlost.

Es gibt noch 2 Exemplare des ersten Drucks de Buches Programming LiveCode for the Real Beginner. Diese kann man vor Ort erwerben für 25 Euro. Die Alternative ist noch 2 Wochen zu warten und für 32 Euro ein Exemplar des zweiten Drucks zu bestellen.

Wenn du mich noch was zu fragen hat, kannst du dich per E-Mail oder per Telefon mit mir in Verbindung setzen.

Folgen noch einige nützlichen Links.
Niederländisches LiveCode forum:
http://nl.runrev.info/
eHUG auf Facebook:
https://www.facebook.com/groups/AUG.eHUG/
LiveCode Nutzer auf Facebook:
https://www.facebook.com/groups/runrev/
Mein Twitter-Konto:
http://twitter.com/xtalkprogrammer

More Info about book “Programming LiveCode for the Real beginner”

Programming LiveCode for the Real Beginner, by Mark Schonewille. Front and back sides of the book. ISBN 978-90-820741-0-9.

Programming LiveCode for the Real Beginner, by Mark Schonewille. Front and back sides of the book. ISBN 978-90-820741-0-9.

Book description:

LiveCode is a software development tool with an easy to comprehend, almost natural, English-like language. Yet, even such an easy programming language needs an introduction. The purpose of this book is to be simple enough to get people started with LiveCode while at the same time elevating the reader beyond the beginners stage.

The first few chapters deal with basic syntax, followed by a discussion of the most important functions and commands of the LiveCode language. Halfway the book, the reader is able to create a simple program. The second half of the book discusses advanced subjects including unicode, network communications, MySQL, XML and more.

Read this book from the beginning till the end. You will know all you need to create software and exchange ideas with other programmers of the LiveCode community.

About the author:

Mark Schonewille has been programming with xTalk languages, including LiveCode, for over a quarter of a century. After obtaining is masters degree in Economics, he worked as a researcher and a teacher at the universities of Groningen and Nijmegen. He founded the company Economy-x-Talk to work as an independent professional software developer. Now he leads a small team of programmers, using LiveCode as one of the main development tools. Programming LiveCode for the Real Beginner is the materialization of his long experience as a LiveCode programmer.

Where to buy:

Programming LiveCode for the Real Beginner can be ordered through every good book shop, but it is faster and possibly cheaper to order it directly from Economy-x-Talk. Go to the website and choose your preferred way to order.