Profile cover photo
Profile photo
Марк Сафронов
Марк's posts

Post has attachment
Публикую PDF-версию "Санскрита для вайшнава", а то её вообще фиг найдёшь в Сети. Обычно везде лежит Word документ, в котором используются несвободные и не пойми какие шрифты для отображения деванагари. В этой версии всё встроено, даже на смартфоне читать можно.

Post has attachment

Post has attachment
Как стать хорошим программистом
Зададимся вопросом: что нужно для того, чтобы стать хорошим программистом? Как и везде, нужно развивать качества и навыки. Для разработчика есть несколько навыков, которые, фактически, обязательны.     Уметь читать и писать по-английски     Уметь "вслепую" ...

Post has attachment
Если кто не знает, я написал книгу в прошлом году, "Web Application Development with Yii 2". Так как мозгов у меня нет, я её ещё и перевёл на русский язык теперь. В конце апреля она выходит в издательстве ДМК-Пресс под названием "Разработка веб-приложений в Yii2", купить можно здесь:

Книга не рассчитана на новичков, я в ней описываю, как пользоваться достаточно популярным в ру-зоне каркасом разработки PHP приложений Yii 2, вот его сайт:

Пока что это единственная книга по этому каркасу, не только на русском, а вообще. ;)

Programming is not math, contrary to common belief.
Neither software development is the same as bridge- or building-building.

Why do people forget that software, which runs on the hardware, is the instructions for the hardware?

Programming is the same as translating.
We as software developers perform translation every day.
We translate from the language of customer to language of specifications.
Then we translate from the language of specifications to the language of high-level programming language of our choice.
Then the runtime of the programming language or its compiler translates automatically to the language of the OS we use.
OS we use talks to hardware in language it understands.
However, relations between OS and hardware are tangled.

Ultimate programmer is a God.
His ultimate program is DNA.
Although, if he actually used Big Bang to create universe, then it becomes his ultimate program.
DNA encodes the program to create proteins which will interpret DNA further and will create other proteins which will finally construct you.
This level of programming is the same as writing the software for a microscopic bootloader which will unpack itself to a compiler which will build installer for a final software.
How the hell do you intend on "debugging" such software?
How do you even hope to read it and understand?

Well, I diverged.

Anyway, we should not forget that we do not build something static.
We write, and we write instructions, what common does it have with the building?
We should take inspiration from the literature, not from engineering.

Math is infinitely far away from the programming.
We need some general things like boolean logic from it at level of programming.
It somewhat closer to software development in general, because at level of software development we should take in account the actual hardware we are using and it's constraints.
Thus, we need things like computability, encoding, algorithms and such --- all of it because our hardware, our ultimate executor of our commands, is imprefect and has limited speed and memory.

Also, there is social aspect in software development, which absolutely requires conversation skills, high level of ethics, astuteness and problem-solving skills in general, which have nothing in common with math.

Forget about math.
And we do not perform building here, as our work is not something static.
We write here and what we write is translations.
Multi-lingual professional interpreters are more fit to our work than CS or Math academics.
Just bear with it.

It seems there is a strong disdain about the Common Lisp's `loop` macro.
A lot of people talk about replacing it with special library `iterate`.
I totally do not understand it, at all.

`loop` syntax is the DSL.
The same method is employed in the following areas:

* Regular expressions.
* Datetime format strings.
* `printf` format strings. Even in the same Common Lisp there is a `format` macro which has its own DSL.

The main point which promotes `iterate` is "extensibility".
So what?
Regular expressions are not extensible, by design.
They would not be "regular" if they were extensible.
`loop` is not, and should not be, extensible, by design.
If it doesn't support objects or generic iterable containers, then it should be rewritten in the implementations, not made "extensible" by any other code.
Otherwise, the code using it will be incomprehensible.
The all-loved book "On Lisp" by Paul Graham states it on like first page: if you add your own syntax to the program, you force the maintainer to learn your language.
All this "extensible" shit is not worth a penny if it makes maintainer's work harder.
You write not for yourself, you write for others to read.

Post has attachment
Web Application Development with Yii 2 and PHP book (by me)
Holy cow, I wrote a book! After the terror of 6 months writing, re-reading and re-writing, "Web Application Development with Yii 2 and PHP" have finally been published at 26th of September. It was completely unexpected for me to receive this contract, I hav...

Post has attachment
The (not so great) Return
Well, no luck with Logdown. Call me greedy for fame, but here in Blogger, integrated with Google+, I have a lot larger audience coverage than at Logdown. Also, I am shifting from Markdown to AsciiDoc, so probably generated HTML will be more Blogger-friendly...

Post has attachment

Post has shared content
Wow! AsciiDoc is incredible!! I'm impressed!

I now consider myself well-versed in AsciiDoc after spending two days converting several full-length technical tutorials to AsciiDoc and really digging deep into its capabilities.

AsciiDoc is a lightweight, yet powerful markup language that's got it all:

- It's readable
- It's comprehensive
- It's extensible
- It produces beautiful output (in HTML, DocBook, PDF, ePub and more)

Now this is a lightweight markup language worthy of producing a book!

Tip: If you are interested in using it to write a book, see git-scribe:

Think of it this way:

If Markdown is a 1st-grader, then AsciiDoc is PhD student.

For basic formatting, Markdown and AsciiDoc look remarkably similar, making AsciiDoc a drop-in, no-brainer replacement to Markdown (both in terms of simplicity and straightforward migration). Yet, the AsciiDoc syntax seems to continue on with no end. In fact, there is no end since it can be extended (and tweaked) rather easily.

What about Docbook? Ah! The great thing about AsciiDoc is that you can still produce Docbook without any of the pain or without sacrificing any features. Perhaps AsciiDoc should adopt this slogan:

Writing in Docbook is just, inhumane.

I could list all features AsciiDoc supports, but a showcase speaks for itself:

Getting back to my experiment....

I had the opportunity to seriously evaluate and contrast the serious lightweight markup languages: reStructuredText (and its complement Sphinx), Textile and AsciiDoc. Hands down, AsciiDoc is the winner. If there's such a thing as a sure thing in software, AsciiDoc is it.

I first converted a full-length technical tutorial into reStructuredText. It took roughly 3 hours to struggle through the syntax and get it converted, with holes still remaining here and there. The syntax is just quirky (what's the obsession with backticks and colons?) and hard to commit to memory. On the whole, it just leaves a bad taste. I was pretty deflated and ready to throw in the towel.

On my way to bed, a hint of curiosity motivated me to give AsciiDoc a shot. Within 15 minutes I had converted the whole document. Plus, I had outputs in HTML, PDF, plain text, ePub and Docbook to show for it. I was even starting to play with additional formatting and organization features. I felt like I found the holy grail of documentation.

Here's the result of that experiment:





Documentation can be easy and fun. Who would have thought?

I'm about as excited about AsciiDoc as I am about git (and the combination is just bliss). And there's still so much to explore. I definitely encourage you to check it out. AsciiDoc is even supported as a markup format on github (and gists), making it easy to get started.

Tip: If you're on Fedora, download the latest version of AsciiDoc from the website rather than install the RPM. The RPM is missing files from the distribution.
Wait while more posts are being loaded