We're sorry but this page doesn't work properly without JavaScript enabled. Please enable it to continue.
Feedback

On Rapid Application Development in Ada

00:00

Formal Metadata

Title
On Rapid Application Development in Ada
Title of Series
Number of Parts
490
Author
License
CC Attribution 2.0 Belgium:
You are free to use, adapt and copy, distribute and transmit the work or content in adapted or unchanged form for any legal purpose as long as the work is attributed to the author in the manner specified by the author or licensor.
Identifiers
Publisher
Release Date
Language

Content Metadata

Subject Area
Genre
Abstract
In the Ada world we typically write mission critical software that just has to work, but in a way one could argue that a lot more software is mission critical than is usually admitted. What does it take to actually perform rapid application development in any language? Can we do it in Ada and why would we do so? A quick look into some language features that can be [ab]used for enabling quick development of 'just a prototype' - which, as practice shows is often deployed into production, usually without proper quality controls and predictable outcome.
Figurate numberSoftware developerCombinational logicCartesian coordinate systemComputer animation
BuildingCodecSurfaceStandard deviationInternetworkingLibrary (computing)Computing platformCASE <Informatik>InternetworkingBuildingProgramming languageProgrammer (hardware)Formal languageResultantCartesian coordinate systemStandard deviationComputer programmingSoftware developerMetric systemArchaeological field surveyStructural loadVotingUniform resource locatorLabour Party (Malta)Video gameMultiplication signSoftwareCategory of beingComputer animation
Software maintenancePrototypeFormal languageMetric systemSoftwareLogical constantProduct (business)Formal languageSoftware bugCartesian coordinate systemPhysical systemSoftware maintenanceMultiplication signSoftware developerMetric systemShared memoryVotingLibrary (computing)PrototypeComputer animation
Library (computing)File formatFile formatString (computer science)Interface (computing)Subject indexingStandard deviationLibrary (computing)Multiplication signIterationVideo gameSystem callStreaming mediaTable (information)Point (geometry)Spring (hydrology)Graph coloringComputer animation
AbstractionEncapsulation (object-oriented programming)ImplementationPhysical systemError messageData conversionType theoryFormal languageData conversionProduct (business)Source codeSoftwareEvent horizonNegative numberCartesian coordinate systemMathematicsMetropolitan area networkMultiplication signPhysical systemCoefficient of determinationActuarySoftware developerRight angleMereologyException handlingRange (statistics)Modul <Datentyp>BitPrototypeError messageComputer animation
Type theoryPrimitive (album)Positional notationOperations researchInheritance (object-oriented programming)Subject indexingLoop (music)Computer programmingSubject indexingPrimitive (album)Positional notationType theoryPoint (geometry)Data structureOperator (mathematics)Inheritance (object-oriented programming)Cartesian coordinate systemVotingPopulation densityComputer animation
Computer fileAsynchronous Transfer ModeLoop (music)Line (geometry)Process (computing)Control flowWrapper (data mining)Limit (category theory)WordField (computer science)String (computer science)Subject indexingLengthInterface (computing)Group actionDesign by contractoutputSoftware testingFormal verificationLocal ringVariable (mathematics)Function (mathematics)Regular expressionReduction of orderBlock (periodic table)Computer fileMedical imagingEquivalence relationProcedural programmingRepresentation (politics)String (computer science)System callElement (mathematics)Level (video gaming)Line (geometry)CodeLimit (category theory)Multiplication signVector spacePoint (geometry)Loop (music)Subject indexingRow (database)Field (computer science)Standard deviationVariable (mathematics)Parameter (computer programming)WordLibrary (computing)Interface (computing)Parallel portCondition numberSoftware developerIterationBlock (periodic table)Hacker (term)Pointer (computer programming)Software testingRegular expressionReduction of orderCartesian coordinate systemWrapper (data mining)Type theoryProcess (computing)Formal languageLambda calculusData structureReading (process)WritingState of matterEntire functionRight angleVideoconferencingQuicksortSpring (hydrology)Logic gatePlanningStreaming mediaImplementationLink (knot theory)Proper mapVotingGroup actionMetreCausalityComputer animation
Physical systemStandard deviationQuicksortPresentation of a groupMemory managementVideoconferencingImplementation
CASE <Informatik>Library (computing)Cartesian coordinate systemSoftware developerMomentumTime zoneComputer animation
Library (computing)Codierung <Programmierung>String (computer science)MereologyoutputSeries (mathematics)Set (mathematics)CASE <Informatik>Multiplication signCodeComputer fileIterationCombinational logicRevision controlPoint (geometry)Right anglePhysical lawWordSystem callPRINCE2AuthorizationVotingWeightResultantLecture/Conference
FacebookOpen sourcePoint cloud
Transcript: English(auto-generated)
The next figure is Tomasz Naroskiński. Alright, got it. Yes, mostly. Okay, so rapid application development and data.
Not a combination you hear about. And most likely most people would call me crazy for saying it's possible. In essence, building things as quickly as possible. Well, it's not always a nice solution to the problem, but sometimes you just need a solution and you don't really care about elegance.
For disclosure, I'm still finding out ways to do certain things because I sometimes just have to find a way to abuse some language features to achieve a goal. So it's still a work in progress, you could say.
Are there any more possibilities to be found? Typically you will find that people use JavaScript, Python or Rabi as recommendation for that, which is all fine and well, except why are they used?
Libraries. They have a lot of libraries to support many things. We don't really have that many libraries because we don't have that many programmers in either. Without libraries, we don't have programmers. Without programmers, we don't have libraries. It's a catch-through tool. Somehow it has to be solved, the problem.
So we've got to create libraries first, I suppose. A lawyer is going to help with this because at least they are going to be more visible and easier to find. Another thing is that the platform disclaims all warranties. That's standard in most ULA's and licenses.
As to say, it doesn't matter the quality of the software, there is pretty much no liability for it failing. And the result is internet of threats and buggy applications. Has anyone actually managed to properly sue and win the case against some company developing software?
Sometimes, very rarely, when they go way overboard with how broken the stuff is delivered.
Kind of, after decades of court cases and... Did they go to court actually? Not yet. Yes, for the next couple of decades.
And the court case will take another decade or two. And by that point, it no longer matters. So it's not really nice. And that's actually why they use programming languages that don't help with solving, or rather, creating proper software. Because if there is no liability, you can use anything at all.
And that's mainly with all these languages that are supposed to be nice for rapid application development. Because there is only time to deliver as metric. But actually, if you look into this stuff, what happens is that they either rewrite the software constantly.
I suppose everyone has seen this happen. And two, bug fixing and maintenance is often just ignored as costs. It's just, cost is delivered and everything else, it doesn't matter.
It's not a proper and nice way things are done and not how it should be done. I also have two of the experienced bugs due to release of just a prototype into production. Because, as we all know, it's just a prototype. And when it goes delivered into production systems. Even from banks.
I had my share of issues with banks delivering software that's not ready to use. Why not AIDA? Yes, we don't have libraries supporting that. It's one thing to have library that does something. And another one that's very easy to use and very quick to achieve a goal.
Because while the goals are similar, it's actually interface that matters. It's all about interface. And our standard library in AIDA is quite good.
But we do have some craziness where I like, for example, AIDA calendar and AIDA calendar formatting. Which, as anyone that has used that one, probably noticed that he also uses the other one at the same time. So you end up with two packages instead of one. Not to mention other things like, for example, unbounded strings not having indexing.
Or iterators define it. So you cannot do four of on unbounded string. For indexing it's because unbounded string is not target type.
Main advantage of AIDA is proper abstractions. We can abstract things. And that means that we can hide things. And that's the ugly details that are needed to achieve goals fast. In Python, for example, there is a convention how to do private stuff.
Convention. Underscore in the name is a convention. It's not a checker. You can still access private parts of anything really. And that software running production almost everywhere. Almost. And strong typing system means that many errors that are bound to happen are discovered early.
And that, of course, means that whatever we achieve, if it compiles, it's likely to work. And that means that we no longer have to debug it. And to force it to work actually. Because time to deliver just having a small prototype that just barely works.
And having something that actually works are two different things. And we can then focus on another product, of course. And also value-based type system. Has anyone experienced issues with type conversions in C? Or rather typecasting, I suppose.
A very one, right? I guess you only change what you see, actually. It's bits are the same, values change, but nothing is preserved. It's nice in Ada because when you have some type that has certain range,
and you try to convert this value to, say, modular type, if that range is negative in the first type, value is negative, then you will get exception. And in C you will just get something. I am not sure what. But something. And it's often repeated in many languages, the same kind of issue.
In JavaScript, implicit conversions. In Python, I suppose, as well. And very well, pretty much. And useful stuff for rapid application development, I find the most abusable is target types, actually.
Not for inheritance, really. Because I don't find inheritance to be the best solution to most of the issues. It's actually kind of backwards. But that notation for primitive operations means that you don't mess up arguments. And that's... If anyone has used ada.txt.io in the file, for example,
anyone probably has at some point forgot to pass argument. And then you end up with a program hanging in an endless loop because you forgot to pass argument. That's my experience. At least it happens at times.
Extra stuff locked behind target types. Like, for example, user-defined indexing. It's kind of handy. And actually very useful for certain types and structures.
Relatively common loop. I think anyone has seen this kind of loop or written it at least once. Standard. Just read the file. But you can do something like this as well. You can actually define iterator for a wrapper around text file.
And you can actually loop over text file getting line at a time. Kind of a hack. But it's really important, it's not what this example does, but what is the limit of how far you can push this thing.
I guess it's one thing to read a text file like this. I suppose. One thing to read text file like this. Another thing to, for example, iterate over, say, unbounded string and getting word at a time.
Or maybe a field if you have field separator. Like CSV files, for example. Imagination is important here. How far we can push it. And can we push it quite far actually. I don't know how far I could push it,
but I have not reached the limit yet. And when there is user-defined indexing, it's very handy. Unbounded string doesn't have user-defined indexing because you need to get type for it.
If you have certain types, like for example, vectors. Or unbounded string, for example, which is basically a vector of characters. You would want to access elements of this vector, or of the structure, just using index. Not going through special procedures and calls and writing even more code
that basically means the same thing, but it's harder to understand what's happening. When some map got, it's pretty much example from standard actually.
Where you have example where you can access, this is actually also indexing. Because indexing takes two parameters. One parameter and a data structure itself.
So you can index by pretty much anything. How far can you go with this? I don't know. Does anyone know? How much automation can be done with this? At the end of the day, it's all about what we can implement inside libraries as interface so that we can do things easily.
And contracts. Lo and behold. They're actually very useful for rapid application development because you can document, for one thing, you can document ahead of time as a spec what you expect as input.
Here is a bug, actually. And you can actually check with post condition if what you get is what you expect to get. So it actually manages to work around the need for as much testing
because you don't need as much testing and it really helps. The less you have to test, the faster you can develop. Just like this. And coming soon is global aspect, which I find to be very nice,
at least in my personal experience, because we often write some procedure and this procedure itself may be just nice procedure that doesn't access any global state. But inside this procedure we have inner procedure. And suddenly it accesses various variables declared inside this procedure.
So something like this. We have X, Y, Z declared inside process, but auxiliary procedure is accessing variables and without global parameter, global aspect,
we cannot check if the human that this is happening actually. And what happens is that at some point in time you notice that actually you want this procedure to be outside of this scope because it's useful in other places. And so then you have to go one after another after global state handling. And that can be quite mind-boggling and time-consuming at times.
So documenting which global states we use and how is actually very useful. Any questions so far? I guess I am not afraid of questions. And other stuff coming with AIDA 2020 as well.
Delta aggregates will be very handy because we all at some point had very big data structures with big records with many fields. If you just want to change one field, I mean, you make a copy of a record and then you want to change just one field.
Just that one field. Well, you can make it with delta aggregates and it's much faster to write. Much easier to understand as well. You can also work with arrays. So it's very nice. Procedural iterators, it's kind of, actually it's going to be useful as well.
We only have in various aspects in the standard AIDA library we have many types and packages that have this iterate or process procedure. So instead of writing a procedure
and then passing a pointer of this procedure to actually process because it takes action, procedure as a parameter, we can actually write a loop and loop over entire data structure and with custom procedure actually without writing.
It's kind of like lambdas in many languages. Kind of. Container aggregates, that's going to be useful as well, but also kind of hard to implement at times I suppose. User-defined thick image,
it's something that was requested for a while and for a long time. And I suppose everyone at some point wanted, or actually I suppose almost everyone writes image procedure or equivalent to write a string representation of a type. Because it's useful for debugging, for quick checking what's going on,
why not have a thick image properly? And user-defined it a lot. Reduction expressions like map or reduce, and parallel blocks which are going to make writing parallel software much faster.
I suppose everyone had something like this at one point in time. And yeah, small advice, GPS helped many. There is actually a lot of stuff inside Gnat runtime, a lot of stuff that people don't realize
just what is there, like for example Speedball stuff, or various sorting algorithms, various heap sort implementations, and also we have XML ID, documentation, and probably some more.
AWS as well. Well, it's kind of short presentation. Questions? I have one question to everyone. In case you see, when it comes to writing a library to support rapid application development,
everyone has his own scratch, each to scratch. Everyone assumes that what they do is what everyone does. That's not really the case. And what I want to do is not exactly what you may want to do. And what I am asking for is for input as to what people want to be done so that such library could be written.
And without the input it's kind of hard to do. I know what I want to do, I don't know what you want to do. Okay. Any questions so far? No questions at all? Not even how far I have pushed iterators?
The only thing is that you don't have to debug your code. Because you can rewrite it. When you write, write away from what you've written. Yes. That's why you use Ada.
How far is the time of debugging into rapid application, into other languages? And it changes a lot. A lot, yes. And that's why I would like to use Ada and enable more people to do it. Because people like me or you for example, we know Ada quite well.
We know Ada so well that we actually can do many things that seem impossible at first. But it's a different story when someone doesn't know Ada. By heart, mostly. I know!
So I hope I won't be called Tomaszap's pathology with an iterator over text files and other things like this.
Yes? We actually have UTF-string in Ada.
That's true. UTF-8 handling in Ada is not trivial.
It depends how you are going to handle the string because handling the strings and then actually graphemes and all possible combinations of what can happen with it is not that trivial. If you just treat it as a series of code points
then you could write a library that does just that and handles only UTF-8 or whatever Unicode version you prefer. I suppose that's something that should be done actually. So that's GDIP and GTK-Ada
as part of that. Yes? Many people are confusing character sets
and encoding. There are totally different issues. UTF-8 is just an encoding. Any other questions?
You're welcome.