-
Notifications
You must be signed in to change notification settings - Fork 10
/
FAQ.docbook5.xml.tt2
3598 lines (3597 loc) · 123 KB
/
FAQ.docbook5.xml.tt2
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE article>
<article xmlns="http://docbook.org/ns/docbook" lang="en" version="5.0" xml:lang="en" xmlns:xlink="http://www.w3.org/1999/xlink" >
<info>
<title>Freenode programming channel FAQ</title>
</info>
<section xml:id="freenode-programming-channel-faq">
<title>Freenode programming channel FAQ</title>
<para>
This page is intended to be global for the whole
<link xlink:href="irc://irc.freenode.net/%23%23programming">##programming</link>
channel. So feel free to clone and reuse.
</para>
<section xml:id="the-questions">
<title>The Questions</title>
<section xml:id="how-do-i-talk-on-the-channel">
<title>How do I talk on the channel?</title>
<para>
In order to talk on ##programming, connect your IRC client to
the irc.freenode.net server, type «/join ##programming»
(without the angle brackets) and press enter. It is a good
idea to register your nickname with the Freenode network (see
/msg NickServ HELP). This URL may work for you:
<link xlink:href="irc://irc.freenode.net/%23%23programming">irc://irc.freenode.net/##programming</link>
.
</para>
<para>
Freenode also provides a web interface here:
<link xlink:href="http://webchat.freenode.net/"><link xlink:href="http://webchat.freenode.net/">http://webchat.freenode.net/</link></link>
. For more information about viable IRC clients see:
</para>
<itemizedlist spacing="compact">
<listitem>
<para>
<link xlink:href="http://perl-begin.org/irc/"><link xlink:href="http://perl-begin.org/irc/">http://perl-begin.org/irc/</link></link>
</para>
</listitem>
<listitem>
<para>
<link xlink:href="http://www.shlomifish.org/open-source/resources/networking-clients/">List
of Networking Clients</link>
</para>
</listitem>
<listitem>
<para>
<link xlink:href="https://en.wikipedia.org/wiki/Comparison_of_Internet_Relay_Chat_clients">https://en.wikipedia.org/wiki/Comparison_of_Internet_Relay_Chat_clients</link>
</para>
</listitem>
</itemizedlist>
</section>
<section xml:id="what-is-considered-on-topic-on-programming-what-is-considered-off-topic">
<title>What is considered on-topic on ##programming? What is
considered off-topic?</title>
<para>
Refer to
<link xlink:href="https://github.com/jeaye/2lb_programming/blob/master/README.md">the
channel rules</link> for more information.
</para>
</section>
<section xml:id="how-do-i-address-someone-to-grab-hisher-attention">
<title>How do I address someone to grab his/her
attention?</title>
<para>
Just say their nickname followed by a colon (":") or
a comma (","). Many IRC clients will allow you to do
that by typing the first letters of the nickname followed by
pressing the
<link xlink:href="https://en.wikipedia.org/wiki/Tab_key">tab
key</link> (so-called "tab-completion"). Please
don't generally private message someone using the
<literal>/msg</literal> or <literal>/query</literal> commands
because that way other people cannot view and contribute to
what you are saying.
</para>
</section>
<section xml:id="i-tried-joining-a-different-channel-for-help-but-i-could-not---why">
<title>I tried joining a different channel for help, but I could
not - why?</title>
<para>
Some channels people try to join to seek help with their
technology (notably ##java) require registration at the
Freenode services. See
<link xlink:href="http://freenode.net/kb/all">Freenode’s
knowledge base</link> for more information about user/nickname
registration.
</para>
<para>
Note that you are still welcome to ask questions related to
specific technologies on ##programming, but otherwise you'll
probably get more help on the topic-specific channels.
</para>
</section>
<section xml:id="what-is-the-channel-for-topictechnology">
<title>What is the channel for
<emphasis>T</emphasis><emphasis>O</emphasis><emphasis>P</emphasis><emphasis>I</emphasis><emphasis>C</emphasis>/TECHNOLOGY?</title>
<para>
You can search the channels list by following the instructions
in the command <literal>/msg alis help</literal> .
</para>
</section>
<section xml:id="why-do-programming-and-other-channels-have-two--whereas-other-channels-have-only-one">
<title>Why do ##programming and other channels have two
"#" whereas other channels have only one?</title>
<para>
To quote from
<link xlink:href="http://richard.esplins.org/siwi/2011/07/08/getting-started-freenode-irc/">this
post about Freenode</link>: «The name of a “Primary Channel”
starts with a single hash (“#”) and is discussion forum for a
specific project or community (like Alfresco, or your local
LUG). “About channels” start with a double hash and host
conversations about a topic or subject (for example:
##security). »
</para>
</section>
<section xml:id="why-do-some-users-on-the-channel-have-v-voice-a--sign-a-blue-circle-etc">
<title>Why do some users on the channel have +v (voice, a +
sign, a blue circle, etc.)?</title>
<para>
These users are voiced so in case the channel is under attack,
and it will become restricted, then they and only they will be
able to talk here. Normally, it should not matter, as when
there is no major abuse, everyone can talk whether +v'ed or
not.
</para>
</section>
<section xml:id="why-should-i-learn-how-to-program-properly">
<title>Why should I learn how to program properly?</title>
<para>
To
<link xlink:href="https://perl.plover.com/Questions4.html">quote
MJD</link> «Because you can't just make shit up and expect the
computer to magically know what you mean, Retardo!». Trying to
whip up working code without a fundamental understanding of
programming may cause any of:
</para>
<itemizedlist spacing="compact">
<listitem>
<para>
Compiler errors
</para>
</listitem>
<listitem>
<para>
Buggy code
</para>
</listitem>
<listitem>
<para>
Security vulnerabilities
</para>
</listitem>
<listitem>
<para>
Data loss
</para>
</listitem>
<listitem>
<para>
Loss of time or money or worse.
</para>
</listitem>
<listitem>
<para>
Wasting the time of the knowledgable people in the channel
by being a
<link xlink:href="https://duckduckgo.com/?q=help+vampire&atb=v140-1&ia=web">help
vampire</link>.
</para>
</listitem>
</itemizedlist>
<para>
So please
<link linkend="i-want-to-learn-programming-which-language-should-i-start-with">learn
programming properly</link> .
</para>
</section>
<section xml:id="how-should-i-ask-a-question-on-the-channel-can-i">
<title>How should I ask a question on the channel? Can
I?</title>
<para>
The first guideline is that you should not “ask to ask” by
saying “May I ask a question?” or asking if anyone worked with
that certain technology. Just ask for help directly. Also see
<link xlink:href="https://dontasktoask.com/">https://dontasktoask.com/</link>
.
</para>
<para>
The second guideline is that you should probably read or skim
the guide
<link xlink:href="https://codeblog.jonskeet.uk/2010/08/29/writing-the-perfect-question/">“Writing
the Perfect Question”</link> (or the older and somewhat
deficient in style
<link xlink:href="http://catb.org/~esr/faqs/smart-questions.html">“How
To Ask Questions The Smart Way”</link> ) and try to follow
their wisdom, which involves doing some prior due diligence.
</para>
<para>
Otherwise, also see the next question for how to share the
offending code with the channel.
</para>
</section>
<section xml:id="i-have-a-problem-with-my-code-how-should-i-share-it-for-people-to-review">
<title>I have a problem with my code, how should I share it for
people to review?</title>
<para>
First of all, your code should exhibit the problem you are
having and should be a ''self-contained'', and ''reproducing''
example (see <link xlink:href="http://sscce.org/">“The Short,
Self Contained, Correct, Example”</link> page). If the code is
too large, please consider reducing it to a more minimal
example that still exhibits the problem (see the
<link xlink:href="https://en.wikipedia.org/wiki/Bisection_method">bisection
method</link> ).
</para>
<para>
Please don't share non-runnable pieces and fragments of your
code, see
<link xlink:href="http://shadow.cat/blog/matt-s-trout/show-us-the-whole-code/">“Show
Us The Whole Code”</link> .
</para>
<para>
Once you have that, you have several options to share it. If
you are coding a web page, you can try sharing your code using
<link xlink:href="http://jsfiddle.net/">jsfiddle</link> .
Otherwise, if your code is self-contained in one file, you can
use a paste site such as
<link xlink:href="http://ideone.com/">ideone</link> or
<link xlink:href="https://paste.debian.net/">paste.debian.net</link>.
Please don't floodpaste the code to the channel because this
is slower and more annoying than using a paste site and may
get you kicked or devoiced out of the channel.
</para>
<para>
If you have more than one file in the project, then you should
put it in a self-contained version control repository on a
code sharing site such as
<link xlink:href="http://github.com/">GitHub</link> ,
<link xlink:href="http://bitbucket.org/">Bitbucket</link> , or
<link xlink:href="https://about.gitlab.com/">GitLab</link> ,
so we can easily clone or checkout it.
</para>
<para>
For more guidelines, see
<link xlink:href="https://github.com/shlomif/how-to-share-code-online">https://github.com/shlomif/how-to-share-code-online</link>
.
</para>
</section>
<section xml:id="i-do-not-see-anyone-talking-on-the-channel---is-it-dead">
<title>I do not see anyone talking on the channel - is it
dead?</title>
<para>
The channel is still active, but may grow silent for several
hours at a time, especially during the weekends and other
holidays. Stick around and you should see some conversation
eventually.
</para>
</section>
<section xml:id="which-integrated-development-environment-ide-or-text-editor-would-you-recommend">
<title>Which Integrated Development Environment (IDE) or Text
Editor Would You Recommend?</title>
<para>
We get asked this question a lot. The answer is a bit long.
First of all, it is likely that the following editing
mechanisms will not be adequate for editing code:
</para>
<itemizedlist spacing="compact">
<listitem>
<para>
Rich-text editors including, but not limited to, Microsoft
Windows WordPad (formerly known as Windows Write, we were
informed that it has a text editing mode, but see below),
word processors such as Microsoft Word,
OpenOffice.org/LibreOffice Writer, WordPerfect, AbiWord,
etc. and WYSIWYG (= "What you see is what you
get") HTML editors. These are not suitable for
editing code.
</para>
</listitem>
<listitem>
<para>
Limited text editors such as Microsoft Windows Notepad
(see
<link xlink:href="http://www.notepad.org/">http://www.notepad.org/</link>
for a very fun link about it ), or
<link xlink:href="https://en.wikipedia.org/wiki/Pico_%28text_editor%29">Pico</link>
which are aimed for casual editing of text documents. More
capable text editors such as
<link xlink:href="http://notepad-plus-plus.org/">Notepad++</link>,
<link xlink:href="http://www.flos-freeware.ch/notepad2.html">Notepad2</link>
and <link xlink:href="http://www.nano-editor.org/">GNU
Nano</link>, should be OK.
</para>
</listitem>
</itemizedlist>
<para>
These editors may still be useful if that's all you can use,
but if you can afford to install and/or use a more capable
text editor, it is, by all means, a good idea.
</para>
<para>
Otherwise, asking the channel about the most recommend text
editor will end up in people giving you their own preferences
(which may have involved many years of trying different
solutions, and dedicating some time to studying their existing
preference and getting accustomed to it). Some links to get
you started:
</para>
<itemizedlist spacing="compact">
<listitem>
<para>
<link xlink:href="http://www.shlomifish.org/open-source/resources/editors-and-IDEs/">The
“List of Text Editors and IDEs”</link> on Shlomi Fish’s
homepage. (Not complete, but covers the most prominent
solutions).
</para>
</listitem>
<listitem>
<para>
<link xlink:href="http://texteditors.org/">The Text
Editors Wiki</link>
</para>
</listitem>
<listitem>
<para>
The
<link xlink:href="https://en.wikipedia.org/wiki/Comparison_of_integrated_development_environments">Wikipedia
Comparison of IDEs</link> and their
<link xlink:href="https://en.wikipedia.org/wiki/List_of_text_editors">List
of Text Editors</link>
</para>
</listitem>
</itemizedlist>
<para>
Note that many decent text editors and IDEs are open-source,
free-of-charge, and cross-platform (Windows, Mac OS X and
Linux/UNIX). As a result, there is no good excuse not to
download one, install it, and use it.
</para>
</section>
<section xml:id="i-want-to-learn-programming-which-language-should-i-start-with">
<title>I want to learn programming? Which language should I
start with?</title>
<para>
Different people will give different answers when asked that.
Most people on ##programming believe that something like
<link xlink:href="https://en.wikipedia.org/wiki/Python_%28programming_language%29">the
Python programming language</link> would be a good start.
Python is a popular, useful, open source, and cross-platform
(runs fine on Windows, Linux and Mac OS X and on many other
less common platforms) language, that is not too hard to learn
and get your feet wet with. Some resources to learn Python
are:
</para>
<itemizedlist spacing="compact">
<listitem>
<para>
<link xlink:href="http://automatetheboringstuff.com/"><emphasis>Automate
the Boring Stuff with Python</emphasis></link> -
“Practical programming for total beginners.”
</para>
</listitem>
<listitem>
<para>
<link xlink:href="http://openbookproject.net/thinkcs/"><emphasis>How
to think like a computer scientist - Learning in
Python</emphasis></link> - a similar book.
</para>
</listitem>
<listitem>
<para>
<link xlink:href="https://python.swaroopch.com/"><emphasis>A
Byte of Python</emphasis></link>
</para>
</listitem>
<listitem>
<para>
<link xlink:href="https://www.obeythetestinggoat.com/pages/book.html"><emphasis>Test-Driven
Development with Python</emphasis></link>
</para>
</listitem>
<listitem>
<para>
<link xlink:href="https://www.youtube.com/user/schafer5">Cory
Schafer's Video Tutorials’ Channel</link> - in case you
prefer video tutorials.
</para>
</listitem>
<listitem>
<para>
<link xlink:href="http://docs.python.org/tutorial/">The
Official Python Tutorial</link> - may not be too useful
for people with no programming experience.
</para>
</listitem>
</itemizedlist>
<para>
Here are some resources for learning other programming
languages, whether as a first language or after knowing some
other languages:
</para>
<itemizedlist spacing="compact">
<listitem>
<para>
<link xlink:href="http://c-begin.wikia.com/wiki/C_and_C%2B%2B_Beginners_Wiki">The
C/C++ Beginners' Wiki</link> and the more mature (but with
a non-clear licence)
<link xlink:href="http://www.iso-9899.info/">Freenode ##C
Wiki</link>.
</para>
</listitem>
<listitem>
<para>
<link xlink:href="http://perl-begin.org/">The Perl
Beginners Site</link> for Perl beginners.
</para>
</listitem>
<listitem>
<para>
<link xlink:href="https://developer.mozilla.org/en-US/docs/Learn">Learn
Web Development</link> on MDN.
</para>
<itemizedlist spacing="compact">
<listitem>
<para>
<link xlink:href="https://github.com/javascript-tutorial/en.javascript.info/">JavaScript
Tutorial</link>
</para>
</listitem>
<listitem>
<para>
<link xlink:href="https://htmldog.com/">HTML
Dog</link>
</para>
</listitem>
</itemizedlist>
</listitem>
<listitem>
<para>
<link xlink:href="https://github.com/EbookFoundation/free-programming-books">List
of Freely available programming books</link> - and other
resources, for many programming languages and in several
human languages. May vary in quality.
</para>
</listitem>
</itemizedlist>
</section>
<section xml:id="what-amount-of-due-diligence-should-i-do-before-asking-for-help">
<title>What amount of due diligence should I do before asking
for help?</title>
<para>
Make sure you know how to program in at least one programming
language (see the
<link linkend="i-want-to-learn-programming-which-language-should-i-start-with">previous
question</link> ) and understand the fundamentals of the
general topic with which you are having a problem, by having
read a book, a good tutorial, a video, an online course, etc.
Otherwise, you might ask the wrong questions, or misguided
ones, and generally waste the time of the more experienced
people on the channel who are trying to help you.
</para>
</section>
<section xml:id="how-do-i-learn-how-to-program">
<title>How do I learn how to program?</title>
<para>
See the
<link linkend="i-want-to-learn-programming-which-language-should-i-start-with">previous
question</link>.
</para>
</section>
<section xml:id="how-should-i-do-binary-inputoutput-properly">
<title>How should I do binary Input/Output properly?</title>
<para>
Some people would naïvely assume that writing a C struct
directly to a file would be a good solution for outputting it
to disk. That is far from being the case, however. The
representation of a struct in memory is subject to many
system-dependent factors, such as:
</para>
<itemizedlist spacing="compact">
<listitem>
<para>
<link xlink:href="http://en.wikipedia.org/wiki/Endianness">Endianness</link>
- also referred to as “byte sex”, this determines whether
bytes are stored in memory with the lowest byte first or
the highest one.
</para>
</listitem>
<listitem>
<para>
Padding - for efficiency reasons, compilers tend to place
empty spaces between the fields of structs. The amount of
such space is not standardised and varies between systems,
compilers (and even compilation options can affect it).
</para>
</listitem>
<listitem>
<para>
Integral data types and pointers can vary in their nominal
size. I.e: an "int" can be 16-bit, 32-bit, or
64-bit, a "long" can be 32-bit or 64-bit, etc.,
which is system-dependent.
</para>
</listitem>
</itemizedlist>
<para>
The O’Reilly book
<link xlink:href="http://www.lemis.com/grog/Documentation/PUS/">Porting
UNIX Software</link> (which is available for purchase, or as a free
download under a Creative Commons licence, on the link), goes
into further depth about these and many other UNIX portability
issues.
</para>
<para>
In any case, the best way to mitigate this problem portably
and safely, is to write (and later read) every field (and
sometimes every byte within) to the disk or network. You
should be able to find some mechanisms inside
<link xlink:href="http://www.shlomifish.org/open-source/portability-libs/">portable
libraries</link> to do that.
</para>
</section>
<section xml:id="what-are-some-best-practices-in-programming-that-i-should-adopt">
<title>What are some best practices in programming that I should
adopt?</title>
<para>
First of all, we should note that many best practices may
still be controversial to a small or large extent, despite
being very common in the industry. We also don't expect a
beginning programmer who writes some simple programs to
immediately employ all the best practices that go into
developing mission-critical software on which lives are
dependent.
</para>
<para>
But here goes with a grain of salt:
</para>
<orderedlist numeration="arabic" spacing="compact">
<listitem>
<para>
Use a good
<link xlink:href="http://en.wikipedia.org/wiki/Revision_control">version
control system</link>. For more about version control
systems and the motivation behind them see
<link xlink:href="http://better-scm.shlomifish.org/">the
“Better SCM” Site</link> and
<link xlink:href="http://www.slideshare.net/xSawyer/source-code-management-systems">Sawyer
X’s talk about source code management systems</link>.
</para>
<para>
As of 2024, <link xlink:href="https://en.wikipedia.org/wiki/Git">the Git version control system</link> has established itself as the dominant and go-to solution. While Git is not perfect, in our opinion we think that <link xlink:href="https://www.shlomifish.org/humour/fortunes/show.cgi?id=sharp-programming-BitKeeper-or-GitHub">it is good enough</link> to avoid using any-of-the-semingly-less-popular alternatives.
</para>
</listitem>
</orderedlist>
<itemizedlist spacing="compact">
<listitem>
<para>
Please don't give the usual cliches that you don't need a
version control system if you’re only one person or that
the project is not large enough to warrant it. You
probably do.
</para>
</listitem>
</itemizedlist>
<orderedlist numeration="arabic" spacing="compact">
<listitem override="2">
<para>
Write Automated Tests. See
<link xlink:href="https://github.com/shlomif/what-you-should-know-about-automated-testing">“What
you should know about automated software testing”</link>,
the wikipedia
<link xlink:href="http://en.wikipedia.org/wiki/Test-driven_development">Test-driven
development</link> entry and other resources.
</para>
</listitem>
<listitem>
<para>
Use a standard build/configuration system for the language
you use. Simple
<link xlink:href="http://en.wikipedia.org/wiki/Makefile">makefiles</link>
may be adequate for small projects, especially those
written in C or C++. If you need to handle dependencies,
build-time configuration variables and other
complications, you should look at
<link xlink:href="http://www.shlomifish.org/open-source/resources/software-tools/">alternatives
for C</link> or the community-based alternatives for your
programming language of choice (e.g:
<link xlink:href="http://en.wikipedia.org/wiki/Setuptools">setuptools</link>
for Python;
<link xlink:href="http://dzil.org/">Dist::Zilla</link> for
Perl;
<link xlink:href="http://en.wikipedia.org/wiki/RubyGems">RubyGems</link>
for Ruby).
</para>
</listitem>
<listitem>
<para>
Deploy a local or hosted
<link xlink:href="https://en.wikipedia.org/wiki/Continuous_integration">Continuous
Integration</link> (CI) service and make sure that failing
builds or tests are remedied.
</para>
</listitem>
<listitem>
<para>
Set up a
<link xlink:href="https://en.wikipedia.org/wiki/Bug_tracking_system">bug
tracker</link> and use it to manage the issues and tasks'
list. Some code-sharing sites provide hosted web-based
issue trackers free-of-charge.
</para>
</listitem>
<listitem>
<para>
Implement
<link xlink:href="https://reproducible-builds.org/">Reproducible
Builds</link> (
<link xlink:href="https://en.wikipedia.org/wiki/Reproducible_builds">Wikipedia
page</link> ).
</para>
</listitem>
<listitem>
<para>
Use
<link xlink:href="https://en.wikipedia.org/wiki/Code_refactoring">code
refactoring</link> to get rid of
<link xlink:href="https://en.wikipedia.org/wiki/Code_smell">code
smells</link> such as duplicate code or magic constants.
Also see
<link xlink:href="https://www.joelonsoftware.com/2002/01/23/rub-a-dub-dub/">"Rub
a dub dub"</link>.
</para>
</listitem>
<listitem>
<para>
If possible, make use of
<link xlink:href="https://github.com/caramelomartins/awesome-linters">linters,
autoformatters, and validators</link> and incorporate them
into the test suite and CI.
</para>
</listitem>
</orderedlist>
<para>
For more information consult these links:
</para>
<orderedlist numeration="arabic" spacing="compact">
<listitem>
<para>
The essay
<link xlink:href="http://www.shlomifish.org/philosophy/computers/high-quality-software/rev2/">“What
Makes Software High Quality?”</link>
</para>
</listitem>
<listitem>
<para>
<link xlink:href="https://github.com/Kristories/awesome-guidelines">“Awesome
Guidelines”</link> - a curated list of high quality coding
style conventions and standards.
</para>
</listitem>
<listitem>
<para>
The Perl Beginners Site
<link xlink:href="http://perl-begin.org/tutorials/bad-elements/">“Perl
Elements to avoid”</link> and its spin-off
<link xlink:href="http://www.shlomifish.org/lecture/C-and-CPP/bad-elements/">“C
and C++ Elements to Avoid”</link> (both of which have a
lot of good advice related to other programming
languages).
</para>
</listitem>
<listitem>
<para>
The essay
<link xlink:href="https://github.com/ryanmcdermott/clean-code-javascript">“Clean
Code JavaScript”</link> on GitHub.
</para>
</listitem>
<listitem>
<para>
The tongue-in-cheek essay
<link xlink:href="https://github.com/Droogans/unmaintainable-code">“How
To Write Unmaintainable Code”</link> .
</para>
</listitem>
<listitem>
<para>
A
<link xlink:href="http://perlhacks.com/2012/03/you-must-hate-version-control-systems/">discussion</link>
on Dave Cross’ Perl Hacks blog titled “You Must Hate
Version Control Systems”.
</para>
</listitem>
<listitem>
<para>
<link xlink:href="http://thedailywtf.com/">The Daily
WTF</link> is a web site dedicated to posts about awful,
but funny, programming practices.
</para>
</listitem>
<listitem>
<para>
<link xlink:href="https://www.joelonsoftware.com/2000/08/09/the-joel-test-12-steps-to-better-code/">The
Joel Test</link> and similar resources on the
<link xlink:href="https://www.joelonsoftware.com/">Joel on
Software</link> site.
</para>
</listitem>
<listitem>
<para>
<link xlink:href="https://simpleprogrammer.com/2017/10/06/5-tips-code-quality/">“5
Tips to Increase your Code Quality”</link>
</para>
</listitem>
<listitem>
<para>
<link xlink:href="https://github.com/caramelomartins/awesome-linters">“Awesome
Linters”</link> and
<link xlink:href="https://www.shlomifish.org/open-source/resources/software-quality-enhancement/">“Software
Quality Enhancement Tools and Links”</link>
</para>
</listitem>
<listitem>
<para>
<link xlink:href="https://dev.to/apkoponen/100-tips-on-software-developer-productivity-36if">“100
Tips on Software Developer Productivity”</link> - by Ari
Koponen.
</para>
</listitem>
</orderedlist>
</section>
<section xml:id="what-is-the-best-programming-language">
<title>What is the best programming language?</title>
<para>
We sometimes get asked this question, and the answer is
simple: there is none. Different languages have different
strengths, weaknesses and often trade offs. You may wish to
read the blog post
<link xlink:href="https://www.shlomifish.org/philosophy/computers/your-programming-language-must-suck/">“Why
Your Programming Language Must Suck”</link> for a short
coverage of some of the important trade-offs a language design
will have, and why not everyone will be happy with your
choices.
</para>
<para>
Even if we settle on a certain amount of preferences, then you
may run into other factors that influence which language you
may prefer:
</para>
<orderedlist numeration="arabic" spacing="compact">
<listitem>
<para>
Should the program run as quickly as possible? Or do you
want to optimise for the developers’ time?
</para>
</listitem>
<listitem>
<para>
Is low memory consumption critical?
</para>
</listitem>
<listitem>
<para>
Should the language be portable to various operating
systems and/or CPUs? Or is it OK if it only runs somewhere
specific?
</para>
</listitem>
<listitem>
<para>
Should the language have an open-source implementation?
</para>
</listitem>
<listitem>
<para>
Should the language have a large user base, and provide
quick and useful support?
</para>
</listitem>
<listitem>
<para>
Should bugs be addressed and fixed quickly in the
implementations?
</para>
</listitem>
<listitem>
<para>
Should the language have any particular built-in features
that you desire?
</para>
</listitem>
<listitem>
<para>
Should the language have an extensive library of
extensions and APIs that can be reused?
</para>
</listitem>
</orderedlist>
<para>
Etc. If you tell us what your needs are, we can help you with
a recommendation.
</para>
<para>
Note that some of the channel members happen to like a certain
programming language in particular and tend to constantly
recommend it to other people. Furthermore, you may run into
language wars where one or more languages are bashed as awful
languages by participants in the channel. That does not mean
these languages are necessarily good or bad or suitable for
what you wish to do.
</para>
</section>
<section xml:id="what-is-the-best-insert-type-of-product-with-some-alternatives-what-is-the-best-and-insert-adjective-here">
<title>What is the best [insert type of product with some
alternatives]? What is the best and [insert adjective
here]?</title>
<para>
We also get asked this a lot and the answer is similar to the
previous question: best in which respect? The various
alternatives may have functionality trade-offs, and even if
the factors are not at odds with one another, there can be
remaining issues due to lack of developer time, policy, or
design. Please tell us what exactly is the most important to
you.
</para>
<para>
Note that "best and [insert adjective here]" is
equally puzzling. Do you want the product with this property
or do you also seek some other qualities?
</para>
</section>
<section xml:id="i-needam-forced-to-work-with-a-certain-technology-eg-programming-language-or-framework-which-i-hate-what-should-i-do">
<title>I need/am forced to work with a certain technology (e.g:
programming language or framework) which I hate. What should I
do?</title>
<para>
You may wish to read
<link xlink:href="https://shlomifish.livejournal.com/1747.html">this
post</link> about Stoicism and Peace of Mind or
<link xlink:href="https://en.wikisource.org/wiki/Tao_Te_Ching">the
Tao Te Ching</link>. Namely, you can say to yourself:
"OK, this is not ideal, but I cannot avoid it, so I'll
try to tolerate it, and make the best of it, and maybe even
grow to like it.".
</para>
</section>
<section xml:id="what-are-good-resources-including-books-to-learn-about-algorithms">
<title>What are good resources (including books) to learn about
algorithms?</title>
<para>
Here are some resources for learning about algorithms:
</para>
<itemizedlist spacing="compact">
<listitem>
<para>
<link xlink:href="http://www.algorist.com/">The Algorithm
Design Manual</link> by Steven Skiena. An accessible, yet
accurate, book and not a very technical one that provides
a good introduction and reference for algorithms.
</para>
</listitem>
<listitem>
<para>
<link xlink:href="http://en.wikipedia.org/wiki/List_of_data_structures">Wikipedia's
list of data structures</link> and
<link xlink:href="http://en.wikipedia.org/wiki/List_of_algorithms">Wikipedia's
list of algorithms</link>.
</para>
</listitem>
<listitem>
<para>
<link xlink:href="http://en.wikibooks.org/wiki/Data_Structures">The
Data Structures Wikibook</link>
</para>
</listitem>
<listitem>
<para>
The CC-by book
<link xlink:href="http://opendatastructures.org/">Open
Data Structures</link>.
</para>
</listitem>
<listitem>
<para>
<link xlink:href="http://en.wikipedia.org/wiki/Introduction_to_Algorithms">The
Book <emphasis>Introduction to
Algorithms</emphasis></link> - by Cormen et. all (a.k.a
“CLR” or “CLRS”) - a comprehensive reference on algorithms
and data structures, but a technical and dry one.
</para>
</listitem>
<listitem>
<para>
<link xlink:href="http://shop.oreilly.com/product/9781565923980.do"><emphasis>Mastering
Algorithms with Perl</emphasis></link> and
<link xlink:href="http://shop.oreilly.com/product/9781565924536.do"><emphasis>Mastering
Algorithms with C</emphasis></link> from O’Reilly Media.
</para>
</listitem>
<listitem>
<para>
<link xlink:href="https://github.com/TheAlgorithms">“The
Algorithms” GitHub organisation</link> - contains
repositories of codebases for popular algorithms and data
structures in several programming languages.
</para>
</listitem>
<listitem>
<para>
<link xlink:href="https://greenteapress.com/wp/think-data-structures/">Think
Data Structures</link> - by Green Tea Press - a gratis and
CC-by-nc-sa lightweight book using Java.
</para>
</listitem>
<listitem>
<para>
<link xlink:href="https://en.wikipedia.org/wiki/The_Art_of_Computer_Programming">“The
Art of Computer Programming”</link> - (aka “TAOCP” or
“Knuth”) - an esteemed series of books, by an esteemed
author, but one that is only accessible to those who are
very experienced programmers, and so not recommended here
due to the scope of the question. Mentioned here only for
completeness sake.
</para>
</listitem>
</itemizedlist>
<para>
There's also a
<link xlink:href="irc://irc.freenode.net/%23algorithms">channel
called "#algorithms" on Freenode</link> and,
naturally, you can discuss algorithms on ##programming, as
long as you perform due diligence.
</para>
</section>
<section xml:id="i-have-an-awesome-idea-for-a-great-project-probably-a-game-and-i-want-people-to-help-me">
<title>I have an awesome idea for a great project (probably a
game) and I want people to help me…</title>
<para>
First of all, we appreciate your enthusiasm, but you should
realise that most of us have better things to do than help you
(even if they are unemployed), and so you should offer money
(and we don't mean a share of the profits.). If not, you are
quite unlikely to recruit anyone.
</para>
<para>
If you cannot offer money, please consider learning the
necessary skills yourself (see the above questions) and
starting work on your own. If you make your project
open-source and publicise it, then other people may eventually
join you, and help you if they find it interesting.
</para>
</section>
<section xml:id="what-is-the-difference-between-scripting-languages-such-as-perl-php-python-or-ruby-and-industrial-strength-languages-such-as-c-c-java-and-c">
<title>What is the difference between “scripting” languages such
as Perl, PHP, Python or Ruby and “Industrial-strength” Languages
such as C, C++, Java and C#?</title>
<para>
Many people have issues with calling dynamic languages, with
dynamic typing and those that are of somewhat more open-source
nature such as Perl, PHP, Python and Ruby “scripting”
languages. See:
</para>
<itemizedlist spacing="compact">
<listitem>
<para>
<link xlink:href="http://web.archive.org/web/20140704054553/http://xoa.petdance.com/Stop_saying_%22script%22">Andy
Lester's Stop saying “script”</link>
(<link xlink:href="http://xoa.petdance.com/Stop_saying_%22script%22">Original
link</link> - currently broken)
</para>
</listitem>
<listitem>
<para>
<link xlink:href="http://www.perl.com/pub/2007/12/06/soto-11.html">Larry
Wall’s “Programming’s Hard - Let’s Go Scripting”</link>
</para>
</listitem>
<listitem>
<para>
<link xlink:href="http://use.perl.org/use.perl.org/_chromatic/journal/35804.html">chromatic
- “Program vs. Script”</link>
</para>
</listitem>
</itemizedlist>
<para>
The problem with calling them that is that while they allow
for getting small and simple things done quickly and easily,
large scale projects (100,000s to millions of lines of code)
have been written in them and are still maintained without any
show-stopping difficulties. That is not to say that these
languages do not have their downsides, but they still do not
preclude <emphasis role="strong">general-purpose</emphasis>,
and/or <emphasis role="strong">large-scale</emphasis>
programming.
</para>
<para>
Furthermore, if we consider Perl/PHP/Python/Ruby/Tcl/Lua/etc.
as “scripting languages” and C, C++, Java and C# as
“industrial strength” where does Common Lisp fit in? Where
does Scheme? Where do Haskell and OCaml? What about the
various dialects of Basic? Fortran? COBOL? It seems that the