Search

Reinhart Previano K.

Do you love to Ctrl-K, Ctrl-/, or / ? Now you can do three of them (>_ )!

No results so far...

Contact Information

Being concise and consistent with “and”.

Well, what could be wrong with the word “and”? Let's look at this example. Box A is full of red candies, while Box B is full of blue candies. Austin mixed all of these contents back into Box A, so we can now say it's full of red and blue candies. In programming, red and blue candies should have been the type of candy where both colors are present in every candy contained inside the box. However, they're are not! Instead, we have some all-red candies and some all-blue candies. So we should say Box A to have red OR blue candies, or specifically, red XOR blue candies. There’s a lot of English sentences which uses the word AND like this. However, a lot of us misunderstood it, as we, robots, prefer to designate them as XOR instead. Here's some other real-life examples: What people saidWhat is should have been for usExplanationAustin mixed all of these contents back into Box A, so we can now say it's full of red AND blue candies.Austin mixed all of these contents back into Box A, so we can now say it's full of red XOR blue candies.Each candy is either blue, red, but not both colors.By visiting AND/OR using our services, you agree to our Terms of Use and Privacy Policy.By visiting OR using our services, you agree to our Terms of Use and Privacy Policy.The term AND here is already a subset of OR, so it's redundant for both written on legal documents.So, do you want the blue dress OR the red one?So, do you want the blue dress XOR the red one?Either blue or red, but not both. Remember that you can only choose one in most cases. Looking from a different perspective. So far, we’re just looking at the intrinsic values of Box A, which is, the extrinsic values for each of the candies. Remember that, in Box A, we evaluate how each of the candies look from the inside of the box, but still outside of the internals of these sweety objects. Or in other terms, we called it as XOR because we’re looking at the exterior of these candies, through the interior of the box. However, if we assume that the box itself is transparent, then shift our perspective to to see the transparent exterior of the box itself, we could consider it to be an AND instead because from the outside, the box contains both blue and red colors, despite the ones who have these colors are the candies themselves. Humans often use the distributive properties of these language conjunctions. Instead of confusing people with “blue AND red candies”, and even “blue XOR red candies”, we could have said them as “blue candies AND red candies”. This is because from the box's exterior point of view, the box has both blue-colored candies and red-colored candies. But again, for the sake of simplicity, they often choose to simplify them as “blue AND red candies”. So, what does these all mean? Starting today, we will start to introduce the word “and”, “or”, and “xor” on our official documentation. Sorry, I mean, “and”, “or”, xor “xor”, because we don’t really force all of these three terms to be included on every page of our documentation. This means that the word “or” should be interpreted as the same as “and/or” (the inclusive “or”), as commonly found in legal documents. These changes will apply into our documentation and blog posts, except for legal documents and contracts as they require the use of standard legal words.

Introducing Shiftine-as-a-Service (SaaS).
Cover image for Introducing Shiftine-as-a-Service (SaaS).
Reinhart Previano Koentjoro resmi berganti nama menjadi Citra Manggala Dirgantara.
Cover image for Reinhart Previano Koentjoro resmi berganti nama menjadi Citra Manggala Dirgantara.
Perkenanan vs Kehendak Tuhan.

“Ya Tuhan dan Allah kami, Engkau layak menerima puji-pujian, hormat, dan kuasa. Sebab Engkau telah menciptakan segala sesuatu, dan karena kehendak-Mu semuanya itu ada dan diciptakan.” Wahyu 4:11 TB2 Kita percaya bahwa Tuhan adalah Sang Pencipta. Dialah yang menciptakan kita, langit, bumi, organ-organ tubuh kita, bahan-bahan makanan kita, dan hal-hal lain yang membuat kita dapat hidup bersyukur hingga saat ini. Tak hanya itu, Dia jugalah yang telah menciptakan orang tua kita, teman-teman kita, dan orang-orang lain yang telah menolong dan memberkati hidup kita. Tepat seperti apa yang diungkapkan anak-anak Allah dalam Wahyu 4:11. Namun, tidak semua hal yang Tuhan kehendaki adalah hal-hal yang berkenan di mata-Nya. Kehendak dan perkenanan itu adalah dua hal yang berbeda. Kalau kita kembali merenungkan bagian Firman di atas, berarti hal-hal jahat pun masih ada hari ini karena Dia masih meng-hendakinya, meskipun Ia benar-benar benci dan sangat sanggup untuk menghentikannya dalam sekejap. Alkitab juga mencatat salah satu perumpamaan dari Yesus Kristus, yang juga menjawab pertanyaan seperti, “mengapa ada banyak orang jahat yang masih hidup, panjang umur, namun banyak orang benar yang, meski-pun tak dibunuh oleh orang-orang jahat itu, tetap mening-galkan dunia dengan cepat?” Selain fakta bahwa Tuhan masih ingin memberikan kesempatan bagi mereka untuk bertobat dan berubah, seperti Saulus yang kini menjadi Paulus, Tuhan juga sedang mengumpulkan banyak bukti bagi mereka yang tetap menolak-Nya, bahwa mereka jelas-jelas berbuat dosa yang besar dan layak dihukum ke neraka. Perumpamaan tentang lalang di antara gandum. [24] Yesus menyampaikan suatu perumpamaan lain lagi kepada mereka, kata-Nya, “Kerajaan Surga itu seumpama orang yang menaburkan benih yang baik di ladangnya. [25] Namun, pada waktu semua orang tidur, datanglah musuhnya menaburkan benih lalang di antara gandum itu, lalu pergi. [26] Ketika gandum itu tumbuh dan mulai berbulir, tampak jugalah lalang itu. [27] Lalu datanglah hamba-hamba pemilik ladang itu kepadanya dan berkata: Tuan, bukankah benih baik yang Tuan taburkan di ladang Tuan? Jadi, dari manakah lalang itu? [28] Jawab tuan itu: Seorang musuh yang melakukannnya. Lalu berkatalah hamba-hamba itu kepadanya: Jadi, maukah Tuan supaya kami pergi mencabut lalang itu? [29] Namun, ia berkata: Jangan, sebab mungkin gandum itu ikut tercabut pada waktu kamu mencabut lalang itu. [30] Biarkanlah keduanya tumbuh bersama sampai waktu menuai. Pada waku itu aku akan berkata kepada para penuai: Kumpul-kanlah dahulu lalang itu dan ikatlah berbekas-berkas untuk dibakar; kemudian kumpulkanlah gandum itu ke dalam lumbungku. Matius 13:24-30 TB2 Gandum dan lalang (tanaman Lolium temulentum, bukan Imperata cylindrica alias alang-alang) adalah dua jenis tumbuhan yang berada dalam kategori rumput-rumputan. Namun, lalang tersebut, meskipun awalnya bertumbuh menyerupai gandum, malah mengelurkan racun baik dalam tumbuhannya maupun bulirnya (sehingga dinamai Lolium temulentum, alias “tumbuhan Lolium yang mema-bukkan”). Karena itu, dalam beberapa terjemahan Alki-tab, tanaman ini direferensikan sebagai “gandum palsu”, karena tidak berbuah dan berkhasiat seperti gandum, dan sang musuh mungkin berniat untuk membunuh tuan tersebut dengan tanaman-tanaman ini. Kepalsuan dan kejahatan seperti inilah yang jelas-jelas dibenci oleh Tuhan. Namun, Dia ternyata menghendaki agar lalang tersebut tetap tumbuh sampai masa panen kedua tanaman tersebut. Tuhan tetap mengizinkan kita, orang-orang benar, untuk hidup bersama-sama dengan mereka yang jahat.

My review of Army of God Conference 2024 (GMS Jakarta Jawa Barat Banten)
Cover image for My review of Army of God Conference 2024 (GMS Jakarta Jawa Barat Banten)
NOTICE: MacBook factory reset on March 4 to 7, 2024.

On Monday, March 4 to Wednesday, March 7, Reinhart will perform a factory reset to his MacBook Air (reinhart-pc3) to reinstall necessary development tools and remove older projects. Sorry for the inconvenience.

So, here’s how to win Firefox over in 2024.
Cover image for So, here’s how to win Firefox over in 2024.
I’ve got a 💯 in TOEFL.
Cover image for I’ve got a 💯 in TOEFL.
An imperative way to build a website!

(#_ )! This tutorial is definitely inspired by an interesting discussion in choosing a web tech stack in 2024. Of course, Imperative HTML is a more esoteric way of writing websites but still easy to learn for (#- )! Have you ever: Built arcane user interface with C/C++? Experienced in using Tcl/Tk (e.g. tkinter in Python)? Rejected the singularity of XML-based files (including QML and XAML) in user interface development? HTML itself was primarily based on XML (up to HTML 4.x). And we really hate if we have to write just to display the text “Hello, World!” this way: <!DOCTYPE html> <html> <body> <p>Hello, World!</p> </body> </html> Like, there’s no main function there. And when you wanted to make these elements interactive, you have to deal with the mess of document.getElementById()? A “Hello, World!” to Imperative HTML. Imperative HTML is technically JavaScript in disguise of a HTML <script> tag. But what makes Imperative HTML different than Node.js-like “back-end JavaScript programming” is that this still produces valid HTML, and even could prevent syntactic HTML errors just because you forgot to put your right bracket or double quotes in the perfect place. Or in other words, an Imperative HTML program webapp programmable webpage like this: <!DOCTYPE HTML> <script> function main() { let text = document.createElement("p"); text.className = "text-lg"; text.textContent = "Hello, World (>_ )!"; document.body.appendChild(text); } window.onload = main; </script> is definitely safer to write than: <p class="text-lg>Hello, World (>_ )!</p> <!-- Oh no, you didn't escape the > in (>_ )! --> <!-- ...and the missing double-quotes! --> Imperative HTML is powered by JavaScript, so you can still benefit from JavaScript’s tighter error-checking than regular HTML, where browsers attempt to guess the meaning and purpose of some HTML and CSS attributes, also known as quirks mode, because of legacy reasons. And since it is powered by JavaScript, the political dignity of "Imperative HTML" itself can be raised in two ways: By declaring that unlike HTML, Imperative HTML is a true programming language, full with Turing-complete selection and repetition control structures (#- ); By giving web developers more power to fight against people who are campaigning against JavaScript, especially for political reasons. Who knows that Imperative HTML gives devs more freedom to do so (#o )? And of course, you can slap on the power of TypeScript, if you really can, to ensure that you’re writing HTML tags and appropriate styles in a standards-compliant way. Isn’t this also a benefit of React’s JSX and CSS-in-JS? Imperative HTML is the intended way. This statement is controversial, of course, but the original XML-like HTML truly feels like the conventional way to write proper websites, yet our reinhart1010.id and alterine0101.id websites are still written in that conventional way. But remember, web browsers are still tasked to parse these HTML tags and convert them into internal structs which make up the today’s Document Object Model (DOM). Having to learn that HTML tags are objects would never be easier without attempting to learn how to declare HTML tags in the object-oriented way. Not to mention React, some of the world’s most loved web frameworks, still renders your elements this way. Since React features a Virtual DOM by default, they have to re-render the hand-crafted HTML JSX elements in the same way of this imperative tutorial: document.createElement() and so. So far, the only main disadvantage of Imperative HTML is that these webpages will not be good for SEOs, because the document is no longer written in machine-readable format (note: we can still leave some metadata inside <head> before <script> in Imperative HTML), causing JavaScript performance overhead, yadda-yadda, and so on. But the main irony is that even modern HTML scraper and parsers like BeautifulSoup parses regular HTML into objects the same way as browsers do, so imperative programming should be the way, right? Just right to the tutorial! In Imperative HTML, you (still) write code inside a HTML file, but you have to set up a few tags to make the web browser know that you're writing Imperative that supports HTML5: <!DOCTYPE html><script> // Your code here... </script> The ending </script> tag is optional, just like the ?> part of PHP scripts, but we highly recommend it as part of our coding convention. The main() function shown earlier is actually optional, but also recommended to ensure that the function is properly executed after the web browser is ready to load (using window.onload = main;. Declaring a HTML tag The usual way to write a HTML content is to use one of its supported tags, then adds attributes, <p id="hero-text" class=""> Hello, World (>_ )! </p> The p is the Element Name, id and class is just some of the attributes, and the final, Hello, World (>_ )! text is the textContent. In Imperative HTML, it is just as easy as this: // Make sure you have put this code after the <script> tag! let text = document.createElement("p"); text.className = "text-lg"; text.textContent = "Hello, World (>_ )!"; document.body.appendChild(text); But if you love to explicitly declare the class, you can use this instead: // HTMLParagraphElement only applies to <p> tags. let text = new HTMLParagraphElement(); text.className = "text-lg"; text.textContent = "Hello, World (>_ )!"; document.body.appendChild(text); In Imperative HTML, you can assign event triggers even before attaching it to the page! // Create a button element that prints the sentence on click let btn = document.createElement("button"); btn.textContent = "Click Me!"; btn.addEventListener("click", function(e) { alert("Hello, World (>_ )!"); }, false); Displaying tags into the webpage And now, the most important part of this is to render these elements into the web browser. Now, our simplistic HTML structure of: <!DOCTYPE html><script> // ... </script> will be very likely to be rendered as this in most web browsers: <!DOCTYPE html> <html> <head> <script> // ... </script> </head> <body></body> </html> We can see that HTML has the <head>, the place to put the webpage's metadata, and <body>, the actual content displayed in the web browser. As a quick reference, Use document.head or document.body to modify the <head> or <body>, respectively These two parts are still considered as HTMLElements, which means you can use .appendChild() to append the element child (e.g. add new item to a HTML unordered list / <ul> / HTMLUListElement) Just like clear() to clear the Terminal console in other programming languages, you can use document.body.textcontent = "" to clear out the contents in the entire page. Now, using the interactive button example, we can simply add them into the webpage using the following code: <!DOCTYPE html><script> function main() { // Create a button element that prints the sentence on click let btn = document.createElement("button"); btn.textContent = "Click Me!"; btn.addEventListener("click", function(e) { alert("Hello, World (>_ )!"); }, false); // Attach them to the webpage document.body.appendChild(btn); } // Attach the main function when the webpage is ready to load! window.onload = main; </script> Well, I think that's all for now. Of course, there will be many interesting ways to use Imperative HTML, so stay tuned and follow us! 🩷


Reinhart Previano Koentjoro
Reinhart Previano Koentjoro
Citra Manggala Dirgantara
Citra Manggala Dirgantara

A Reinhart company

Products

Company