このページはEtoJ逐語翻訳フィルタによって翻訳生成されました。

翻訳前ページへ


How good programmers design and develop 使用/適用s -lt3Ne.htm HOME - - - - - Lazarus Tutorials TOC - - - - - - Other 構成要素 for programmers
Delicious.Com Bookmark this on Delicious     StumbleUpon.Com Recommend to StumbleUpon

Yes, but how do we get there?

This has good (警察などへの)密告,告訴(状), and a search button at the 底(に届く) of the page

Please don't 解任する it because it isn't 十分な of graphics, scripts, cookies, etc!

This page is "browser friendly". Make your browser window as wide as you want it. The text will flow nicely for you. It is easier to read in a 狭くする window. With most browsers, 圧力(をかける)ing 加える, minus or 無 while the 支配(する)/統制する 重要な (ctrl) is held 負かす/撃墜する will change the texts size. (大きくする, 減ずる, 回復する to default, それぞれ.) (This is more fully explained, and there's another tip, at my 力/強力にする Browsing page.)


Two sorts of help with programming are not hard to find on the web. This tutorial is of a different 肉親,親類d.

平易な to find: a) 言及/関連 作品 to tell you, say, the parameters needed by AssignFile. b) Sourcecode of 完全にするd 使用/適用s, or for useful subroutines.

In this essay, you can "look over my shoulder" as I move an idea from a sketch に向かって a finished bit of code. I hope it will help you become more 技術d at getting from an idea for an 使用/適用 to the finished 製品.

Parts of this should sound familiar, if you have read many of my tutorials. This looks at important 概念s. Maybe if I 令状 about them and you read about them, yet again, some 面 that you hadn't fully しっかり掴むd from previous experience will finally "click" into place? I am 大部分は self taught... and I can 保証する you: That is a very, very inefficient way to master these 技術s.

How things are written

Programming is an art, a (手先の)技術... not a science.

It's a bit like building a house.

The housebuilder starts with "I want to build a house."

Let's say the programmer started with "I want to make a new wordprocessor."

All of the ideas about good 事業/計画(する) 開発 現在のd here have 使用/適用 to a wide gamut of design 仕事s. Even the design of this tutorial could be 取り組むd thus.

Each starts with a "big picture". Each must then 精製する their idea somewhat...

House: Two stories, 2 bedrooms, kitchen, living room, dining room, 大(公)使館員d garage.

WP: Way to enter formatted text, save work to とじ込み/提出する, re-負担 以前 started 職業s, print results.

Then each designer takes each bit of "the idea", and looks at it in 詳細(に述べる), probably breaking it 負かす/撃墜する その上の into sub-仕事s, and sub-sub-仕事s.

Consider the whole 仕事 to be 代表するd by an oak tree. At ground level, if you put your 武器 around the trunk, you are hugging the whole 事業/計画(する), be it build-a-house or 令状-a-wordprocessor.

As your 焦点(を合わせる) rises up from the ground, the trunk breaks up into separate sub-trunks, they divide again into 支店s, and so on.

One sub-trunk might be "Bedroom" (to be divided higher up into "前線 bedroom" and "支援する bedroom"), or, in the programming example "print results"

You are done with the "breaking 負かす/撃墜する" 過程 with you know at every point on "the tree" you are 確信して that the description there is something you can understand. And that the pieces "fit" together. And that "big" ideas (like "print results") have been broken up again (and if necessary again and again...) until you are 負かす/撃墜する to such small things that you know you can build (or program) "that".

There are three really tricky bits that make this an art or (手先の)技術. It isn't like "What is 3+5", or even "What is the mineral composition of Pluto". There is An Answer to both of those, whether you know it or not.

In 事業/計画(する) design, there isn't An Answer to "What is the 権利 way to break this up?"

When you have 知恵, you will "just 自然に" break 事業/計画(する)s up 井戸/弁護士席. The way Joshua Bell "just 自然に" plays the violin. To get 知恵, you need experience. Experience is what you get when you try to do things without enough 知恵.

How to 分裂(する) it up. That's Tricky Bit One.

I said earlier that you need to keep working on the design until you know that you can do all the things at the tips of the 支店s. You'd be amazed at how many times I get 90% through a 事業/計画(する), only to discover that I can't do one of the things I thought I could do... a thing 必須の to the 機能(する)/行事ing of what I am building.

And the third tricky bit, knowing that the pieces fit together, is 平等に 背信の. But reviewing, reviewing, reviewing your 計画(する) will 支払う/賃金 (株主への)配当s. Re-working a half-built something, to 打ち勝つ a problem you hadn't noticed earlier is almost always tedious. It is also one of the prime 原因(となる)s of bugs entering a program. You 結局最後にはーなる breaking "b" as you 始める,決める about 直す/買収する,八百長をするing "a".

So much for planning

What I've just 述べるd is called "最高の,を越す 負かす/撃墜する design". When you've ignored my next 支配する long enough, you will finally know how good it is:

Don't start building it until you finish designing it

The planning isn't nearly as much fun as the building... but the more 成果/努力 you put into the planning, the designing, the better the "building", the better the actual typing in of all the program code will go.

(By the way, while not 厳密に within the 鮮明度/定義 of "building", unless you 実験(する) your work as you go along, you will have problems and an unreliable, unsatisfactory final 製品. And doing 実験(する)ing 井戸/弁護士席 is another high art... but a story for another day.)

Once you have really finished a good design, it is time to start the building of your masterwork.

We created a 事実上の "tree" in the design 行う/開催する/段階, working from the "底(に届く)" (幅の広い 声明 of 全体にわたる 機能(する)/行事, then 機能(する)/行事 of 構成要素s, then 機能(する)/行事 of 構成要素s- of- 構成要素s, etc.)

During the "building" 行う/開催する/段階, more usually called "開発", we work from the tips 支援する to the trunk.

The "print results" 構成要素 might be broken up into "choose printer", "print", "排除する/(飛行機などから)緊急脱出する last page", "turn off printer".

During 開発, we might put together a little program which "偽のd" the 準備 of something to print. We would then 令状 something which would send it to a particular printer. 令状 the code to send the 偽のd text to the printer. 令状 the code to 排除する/(飛行機などから)緊急脱出する the last page. Turn off printer.

When we had all of that working reliably, we could "fancify" the "select printer" part, to make it 有能な of 受託するing input from a 使用者, to 許す 選択 of different printers. Later, after other work, we will have a program 有能な of putting together something to be printed. At that point, we just "plug in" the bits we've been talking about, the bits to 現実に do the printing of "it".

That brings us to a very neat example of a 批判的な element in all of this.

Think about the things I've been 説. The "準備する text to print" module is going to produce something. The "print it" module is going to need something to print.

Those two "somethings" have to be 同等(の). You have to 計画(する) everything so that the 特徴 of the "生産(高)" of one module are the same as the 特徴 needed in the "input" of another module.

(It all goes 支援する to what I said about programming 存在 an art and a (手先の)技術, not a science.)

いつかs, of course, the 生産(高) of one module is just a number, and the module which is going to use it only needs a number. In such 事例/患者s it isn't hard to get things 権利. Try to see how in other 事例/患者s, you are still passing things between modules, and the 特徴 of the 生産(高) have to be suitable for the module which 受託するs it as input. This is the 重要な to 存在 sure everything "fits together".

A 明確な/細部 example of all of this

Don't be 誤って導く by the fact that I am telling you only part of the story of the design (planning) and 開発 (building) of an 使用/適用 I created. It may seem that the 開発 of the sub-部隊 we are going to discuss (機の)カム 直接/まっすぐに after the design for that sub-部隊, in 孤立/分離, had been created. Not so. I am just skipping over the 残り/休憩(する) of the design work, and skipping over the parts of the 開発 which happened before I could start building the sub-部隊 I will talk about here.

While you are reading this, try to get a feeling for the fact that the whole 過程 is recursive, or fractal... like a hall of mirrors. The 全体にわたる 仕事 was divided into sub-部隊s. They were divided into sub-sub-部隊s, and so on... but only up to a 確かな point. (When are you done sub-dividing? The Master Designer "just knows". The 見習い工 makes mistakes, and 耐えるs "learning experiences". You know you didn't sub-divide enough when, during the building 段階, you find something doesn't "fit", or that you don't know how to do something important.)

Not only is the design 段階 recursive, the 開発 段階 is too. You 組み立てる/集結する stuff into sub-sub-sub 構成要素s. Then you 組み立てる/集結する sub-sub-sub 構成要素s into sub-sub 構成要素s. Then you... until you reach the end.

Here's my example...

The "input" to the sub(-sub-sub...) module I am talking about is as follows...

A computer with some folders already 設立するd. And in each of them, a sub-folder called "Older". And, maybe, some .jpgs. If there are no jpgs at the moment, some may appear in the folders from time to time, by 過程s outside the 範囲 of what the 現在の 事業/計画(する) need 供給する for.

A constant called kMaxArr. An array, 持つ/拘留するing strings, called sImageFolder[]. The elements of the array will 持つ/拘留する things like "C:\Myfiles\Cam1\"... in other words they will 明示する folders. The folders may or may not 存在する. (Such 詳細(に述べる)s are important!) The last element of the array will not have an 索引 greater than the number held in kMaxArr. (I will 簡単に say "... last element won't be more than kMaxArr" in 類似の 状況/情勢s from here onward, 暗示するing "the value in kMaxArr" when I say "kMaxArr").

Besides the constant (kMaxArr), there is a variable, bMaxArrElInUse, which tells us the 索引 of the last element of sImageFolder[] which 現在/一般に has a meaningful value in it.

The 環境 also 含む/封じ込めるs a string variable called sPathToAssmFldr. It to 持つ/拘留するs something like "C:\AnOtherPath\AssemblyFolder\".

Why do they have those 指名するs? Where to the values in the come from? What are in the .jpg とじ込み/提出するs? 非,不,無 of these things 事柄 to us, during the 段階 of (first) design, or (second) 開発 which I am 令状ing about today. They are "given"s. Their whys and wherefores have all been considered and アイロンをかけるd out, at a different 行う/開催する/段階 of the design 過程.

What does 事柄 to us is what we have to do with what we are given, and in the sub-module we are working on.

In (a rather 十分な) nutshell...

By the end of the module, we need any jpeg とじ込み/提出するs which were in any of the folders 明示するd by sImageFolder[0] to sImageFolder[bMaxArrElInUse] to have been moved to the /Older sub-folder in each of the parent folders. Except the "youngest" jpg 現在の. That not only stays (for now) in the parent folder, but also a copy of it has to be made to a sub-folder (指名する: in sSubFolder (e.g. Images\)) of sPathToAssmFldr (e.g. C:\Misc\PicHarvest\), under the 指名する 決定するd by the contents of the string array sDestCoreFilename[] (e.g. Img01.jpg)

Whew! That's "all". 現実に, it isn't asking very much. But pinning 負かす/撃墜する the 詳細(に述べる)s takes some words.

To recap: We will look in some folders, one at a time. (It will be done with a subroutine. Which folder we do "now" will be 決定するd by a parameter passed to the subroutine.) We will find the youngest .jpg in the folder, and make a copy of that どこかよそで. All of the other jpgs in the folder will be moved to a sub-folder of the folder. That's all.

(PS: 公式文書,認める to myself: In fact, when I wrote the final 見解/翻訳/版 of the above, it 単に returned the 指名する (the 核心 指名する) of the とじ込み/提出する to copy. The actual copying was done outside of the 手続き.)

A picture is 価値(がある)...

Having pinned 負かす/撃墜する just 正確に/まさに what we want done, we can now think a bit about how we are going to do it.

Remember "divide and 征服する/打ち勝つ"? 井戸/弁護士席, our 仕事 is, 基本的に...

So far, so good. But it may not be possible to find the youngest out of all the jpgs in the folder in a 選び出す/独身 pass.

So, new 計画(する).....

<!--NOT CODE-->
repeat
  選ぶ up a number of jpgs from the source folder
  Find youngest in them
  Copy all to the "\Older" sub-folder
Until every jpgs has been looked at

Make a copy of the youngest jpg to the sAssmFldr folder.
Make a copy of the youngest jpg 支援する to the source folder, to "seed" things for the next time this module 遂行する/発効させるs.

Now... that leaves out a few 詳細(に述べる)s, like what 指名する to use when making the copy, at the end. Nor does it say how we know every とじ込み/提出する has been looked at. But it is "完全にする", if only an overview.

My next bit of planning was done with 署名/調印する in paper, '原因(となる) for such things I can work better that way. It 供給(する)s the 詳細(に述べる)s of the "how" which were 欠如(する)ing from the overview just 現在のd.

We will pass the に引き続いて to the subroutine, in the variables 示すd...

We will have a special type 利用できる to us for use in the 決まりきった仕事:

TFilesDetails: 記録,記録的な/記録する
   Time: Integer;
   Size: Integer;
   Attr: Integer;
   指名する: TFileName;

"Time" in this 状況 連合させるs a date with a time. Time=0 was a long time ago, a time before any jpg I will have on my 運動.

We will have a 機能(する)/行事, written by us, called SomeFields, to move the Time, Size, Attr and 指名する from a TSearchRecord variable to a TFileDetails variable.

Sundry 地元の variables we will use...

(The に引き続いて picture might look like it was drawn in one 試みる/企てる. I can 保証する you that it was not. From my first 試みる/企てるs to this finished 製品 took three 草案s, the second in pencil with much crossing out and re-working. Going through that 草案ing 過程 軍隊d me to 焦点(を合わせる) on the parts of the design I was trying to articulate. In hindsight, I jumped too far "up" the tree. I had a general idea of this part of what I was trying to do, and I jumped to 令状ing out too many 詳細(に述べる)s in one place. It would have been better if I had sub-divided the already sub-divided 仕事 before I 試みる/企てるd this level of 詳細(に述べる).)

Diagram of program execution

Who would have thought that what we 手配中の,お尋ね者 to do was so コンビナート/複合体? It was just "find the youngest とじ込み/提出する", "move the others", after all! Part of the problem was 供給するing for all the possible シナリオs, e.g. there 存在 no *.jpg in the folder at the start of the 過程. Part of the problem was my 意向 to do this in (製品,工事材料の)一回分s, so that the 過程 could 融通する any number of とじ込み/提出するs, even though memory 限界s mean that we can only do a finite number in any one pass.

Make you laugh? While typing the above, and halfway though the 罰金 copy of the 初めの 計画(する), I realized that it was 欠陥d. Oh no! It would, I think, have worked. But it occurred to me that there was a better answer 利用できる...

Diagram of alternative program execution

失望させるing to have spent all that time on the first, inferior, 計画(する). But what if I hadn't been working so carefully? I would never have realized that the DESIGN was bad. I would have been struggling... probably terribly... with developing a bad design. Not fun. Taking the time to really work on the design paid off, because a second approach (機の)カム to me while I was trying to 始める,決める out the bad first "answer" 明確に. (The fact that it was so コンビナート/複合体 was a "red 旗" which had me thinking, "there must be a simpler (always better, if functionally 同等(の)) way."

There is a possible special 事例/患者 which would have been いっそう少なく likely to arise, had I used the first design. (By the way: Notice that there can be two (or more) different valid answers to a given design goal.)

The special 事例/患者 is this: What if, while you are 決定するing which is the youngest .jpg in the folder, a new .jpg comes in? With the second design, that is okay.... it will still be there the next time the 手続き is invoked. (And the wait to have it considered for the "生産(高)" directory will not be a problem for the wider goals of the 全体にわたる 使用/適用.)

Besides 存在 いっそう少なく コンビナート/複合体, so likely to be developed more quickly, and いっそう少なく likely to have bugs, the second design will 遂行する/発効させる more 速く. I (機の)カム up with the first design because I started with the idea that I would have to 過程 the .jpgs in (製品,工事材料の)一回分s, that I "couldn't" 過程 them all in a 選び出す/独身 pass. Once I'd made that "決定/判定勝ち(する)", the problems started piling up. I solved them... but it would have been better to go around them, which was possible when I saw that I was wrong in my 仮定/引き受けること that I "needed" to work in (製品,工事材料の)一回分s. Sigh.

(I was also 雇うing a sort in my 初めの 計画/陰謀... and it wasn't necessary. I need to know which とじ込み/提出する is the most 最近の, but I don't need the sequence of the others, do I?)

Look at either of the diagrams, in a general sense. Forget the 詳細(に述べる). What do you see? Those lines that enclose things, and enclose enclosed things, and enclose enclosed enclosed... things are just diagrammatic 代表s of what I have been talking about. They show how a problem can be 扱う/治療するd as having some general modules. And then the modules can be broken up. And the pieces broken up even more finely, etc.

Your program code, if it is 井戸/弁護士席 written in a modern language without GOTOs... even met those?... will "look" something like the diagrams. You can "compose" diagrams like the above on a keyboard with a wordprocessor. But I still commend "pencil and paper" to you for roughing out your 計画(する).




I hope that helps...

So. A somewhat unusual essay for my collection of tutorials. This didn't really have "the answer" to anything 明確な/細部. But I hope it will have 増強するd messages which are 現在の to 変化させるing degrees, 暗黙に and explicitly in many of my tutorials.

Learning to program is more about learning a 過程, a (手先の)技術, than it is about knowing the 権利 word to fetch the computer's idea of the 現在の date.

If you read this essay with a sincere 意向 of "learning something", I don't think you'll やめる be able to say what you learned. But I hope that in the weeks ahead, as you do your own programming, maybe you will do things you might not have done. I hope that you will get from an idea or 必要物/必要条件 to a finished, working 使用/適用 more quickly and easily. And if not more quickly or easily, that at least the 使用/適用 will be more 強健な, more 使用者 friendly, more 柔軟な than the things you were 令状ing 以前.

Thank you for your 成果/努力 in getting through this. I 保証する you: It wasn't all that 平易な to 令状, either! If no one reads these things, my 成果/努力s have been wasted, and I'd hate to think that is the 事例/患者.





            力/強力にするd by FreeFind
  場所/位置 search Web search
場所/位置 地図/計画する    What's New    Search This search 単に looks for the words you enter. It won't answer "Where can I download InpOut32?"

If you visit 1&1's 場所/位置 from here, it helps me. They host my website, and I wouldn't put this link up for them if I wasn't happy with their service. They 申し込む/申し出 things for the beginner and the 会社/団体.www.1and1.com icon

広告 from page's editor: Yes.. I do enjoy 収集するing these things for you. I hope they are helpful. However... this doesn't 支払う/賃金 my 法案s!!! Sheepdog ソフトウェア (tm) is supposed to help do that, so if you 設立する this stuff useful, (and you run a Windows or MS-DOS PC) please visit my freeware and shareware page, download something, and 循環させる it for me? Links on your page to this page would also be 高く評価する/(相場などが)上がるd!
Click here to visit editor's freeware, shareware page.

Link to Lazarus Tutorials main page
How to 接触する the editor of this page, Tom Boyd


Valid HTML 4.01 Transitional Page 実験(する)d for 同意/服従 with INDUSTRY (not MS-only) 基準s, using the 解放する/自由な, 公然と accessible validator at validator.w3.org. Mostly passes. There were two "unknown せいにするs" in Google+ button code. Sigh.


If this page 原因(となる)s a script to run, why? Because of things like Google パネル盤s, and the code for the search button. Why do I について言及する scripts? Be sure you know all you need to about spyware.

....... P a g e . . . E n d s .....