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

Blog posts from the feed-en-tech channel (@feed-en-tech)


Error 404 when using GitHub when I reload the page

This question was originally asked on StackOverflow. View original question I am making an E-commerce website with react and I upload the website to Github pages the deployment works ok, but when I click the Nav buttons to go to different parts of the webpage and reload the page, an error 404 appears: Failed to load resource: the server responded with a status of 404 () In the local host it works totally fine. Should I need to deploy my website as a new project again? I have always upload the websites the same way and I did not have this problem. I actualized my google browser, can there can be a compatibility problem? Thanks a lot! Note: I assume that you are using create-react-app with JSX and react-router-dom like this: <BrowserRouter> <Routes> <Route exact path="/" element={<HomePage />} /> <Route path="cart" element={<CartPage />} /> <Route path="settings" element={<SettingsPage />} /> </Routes> </BrowserRouter> Well, HTTP routing in GitHub Pages works differently than using the npm start command in your local machine. And fortunately, the developers behind create-react-app have already explained the technical reasons behind this: If you use routers that use the HTML5 pushState history API under the hood (for example, React Router with browserHistory), many static file servers will fail. For example, if you used React Router with a route for /todos/42, the development server will respond to localhost:3000/todos/42 properly, but an Express serving a production build as above will not. This is because when there is a fresh page load for a /todos/42, the server looks for the file build/todos/42 and does not find it. The server needs to be configured to respond to a request to /todos/42 by serving index.html. And yes, GitHub Pages also counts as a static file server, and expects that those routes are available as individual static files (e.g. build/cart.html for the /cartroute), and the goal here is to trick GitHub Pages to serve index.html instead for all of these routes. However, it is currently notpossible to fix this issue on the GitHub Pages' side, e.g. by applying the .htaccessconfiguration file (since GitHub Pages doesn't use Apache Web Server) or going to the repository settings on GitHub. So, what can be done here? The above code snippet uses <BrowserRouter>, which is known to be incompatible for hosting with GitHub Pages. And good news, many recommend to replace the <BrowserRouter> into <HashRouter>,which should work in practically all static file servers (see technical reasons here). There's a dedicated FreeCodeCamp article on how to set up <HashRouter> for your React project and publishing it into GitHub Pages. Note: Once you have replaced it with <HashRouter>, you will need to take care of existing hardcoded paths in HTML/JSX tags as <HashRouter> uses good-old HTML anchor/ID tags (e.g. #menu). That means <a href="/cart"> in your React app must be replaced with <a href="#/cart"> (Note the additional hash/# character there) or else it will again return a 404.

New Year, New Keys: Exciting PGP and Git updates from us, coming 2022.
Cover image for New Year, New Keys: Exciting PGP and Git updates from us, coming 2022.
oh hey, it's HAM!
Cover image for oh hey, it's HAM!
COMPUTERUN 2.0 Website

ah, here we go again... upgrading a old, messy codebase made by Reinhart and friends at HIMTI since last year... bleep! i'm pr0xy, somewhat an intern && a humble *pointer of Reinhart; y'know what, i wanna #include an array of words from Why's (Poignant) Guide to Ruby to motivate all of you guys[] working on COMPUTERUN 2.0 && i++, especially since this will be my last project before signing off as the Manager of the Web Development division of HIMTI BINUS University: I’ll be straight with you. I want you to cry. To weep. To whimper sweetly. Code so beautiful that tears are shed.Why’s (Poignant) Guide to Ruby && i suddenly remembered that the folks at HIMSISFO are now struggling with Java instead of C(#)! ah, that's why many of you wear glasses and still don't know what dangling pointers are... i see... alright... amarga sampeyan kabeh luwih ngerti basa Java, sumangga kita System.out.println()no kabeh ArrayList<Thing> sing wis rampung ing divisi pangembangan Website website = new Website("COMPUTERUN 2.0: EXECUTE");! what have we done? um... what?! we've done so many things; in fact, it wouldn't be "COMPUTERUN 2.0" if we didn't actually upgrade the old junk codebase! we kickstarted our improvements to the existing COMPUTERUN 2020: INSIGHT registration system by refactoring and creating another one at https://registration.himti.or.id; then we believe in recursion && so we built a new parser which (ab)uses yaml, markdown, and laravel blade templates to quickly build static websites, and today i'm gonna... hey Shift, is that you? i heard you wanna give some News[] related to COMPUTERUN; wanna println()? a Shift-y intermission Sure! And hey, you know who I am, right? I'm Shift(ine) and MY NEW METALLIC HAIR IS AWESOME!!! And oh, if you're looking for Caps, she's currently being worn by another blue shell to fly and help me send some emails. But she's fine... First, let's talk about emails, shall we? Well, as some of you might know, I'm (currently) the master of email delivery, 'cause I am! We currently share the same address, noreply@himti.or.id, to send emails from COMPUTERUN 2.0 and some of our events at HIMTI BINUS University. In order to prevent our emails for being flagged as spam, we're limiting ourselves to send a maximum of 50 emails per hour. And that's why we have to switch, check and send emails from 3 different databases! One for general (registration.himti.or.id), one for HIMTI ELECTION 2021, and of course, another one for COMPUTERUN 2.0. But now, since we're done with the election, we'll be able to allocate more time on a single day to send more emails to COMPUTERUN participants, which will take effect starting today! We're increasing the number of delivery from 4 batches a day to 6 batches a day - perfect for sending a total of 300 emails for a single damn day. Oh, here's me pinging Reinhart all the time when there's a new email being sent. Remember that I'm a Service, not a daemon like pr0xy because Windows said so... Imagine yourself being terrorized by me this way... Next, there’s a really cool trick on our COMPUTERUN website: You can finally Ctrl+K like it’s Slack and Notion! Seriously, I don’t even know why did Reinhart implement this feature on COMPUTERUN but well, here it is. It's also the default menu you'll gonna see on mobile, so yeah, hasta la vista, Bootstrap hamburger menu! Soon, we'll rolling out new accessibility updates to make sure that this menu works for screen readers and keyboard nerds like you, pr0xy! I can't believe I just spent 5 minutes just to println() all of this, but if you're a coordinator of the following official BINUS University Student Organization websites: https://student-activity.binus.ac.id/basishttps://student-activity.binus.ac.id/binaryhttps://student-activity.binus.ac.id/himkahttps://student-activity.binus.ac.id/himsisfohttps://student-activity.binus.ac.id/himti You can now give a shoutout to COMPUTERUN 2.0 just by creating a NEWS or ARTICLE and put "COMPUTERUN 2.0" inside of the list of tags. Here's what I mean: So your shiny love and articles can be shown directly to those who are visiting the main COMPUTERUN website, like this! Well, that's all I wanna tell. So, goodbye and see you again! yeah, thanks Shift for the amazing println and now let's continue my discussion; speaking 'bout bundles, so, we've some quirks in our event registration system: we separated registration forms for (business-it case || web design) && workshop bundle at https://computerun.id/info/business-it-case-bundle and https://computerun.id/info/web-design-bundle; so if you would like to have that bundle discount, you'll need to register through that special form (or contact our committees if you're confused about that);everyone joining sprint, business-it case, && web design will be automatically added to our opening ceremony; this means that everyone who's signing up for the bundles won't be automatically registered into the respective events (especially when they haven't done the payments), so please take a while while we'll accepting ad adding you to the respective events; just don't forget to finish your payments and tell us if you're done! (ab)using yaml, markdown, && laravel blade? https://twitter.com/reinhart1010/status/1451382082442186754?s=20 our old COMPUTERUN codebase is written using php && laravel, && we're mainly using blade to define our layouts; but thanks to our recent efforts, we're able to build this interactive faq section: just by spawning a few lines of yaml code: title: "FAQ" children: - type: "faq" contents: - question: "Can I participate in SPRINT outside of Indonesia?" answer: - type: "markdown" text: "We would like to apologize that SPRINT is currently unavailable to international participants due to concerns with international shipment/delivery of our Finisher Pack." - question: "How do I get the STRAVA club link and the upload form?" answer: - type: "markdown" text: "Once your registration has been approved, please come back to this page (under the **Join Now** section) to see the STRAVA club link as well as the running record upload form." - question: "Should I pay the Shipment/Delivery Fee first or later?" answer: - type: "markdown" text: "**Yes,** please pay the delivery fee altogether with the registration fee to us." - type: "markdown" text: "If you are registering for two (2) persons, you'll need to pay the Shipment/Delivery Fee for both." - question: "I'm registering for two pax and we're living in the same place. Can I just pay the Shipment/Delivery Fee once for both of us?" answer: - type: "markdown" text: "First, please make sure that both of you agree to do so, since we will **not** be responsible for handling further deliveries once the Finisher Pack(s) have been successfully delivered to you." - type: "markdown" text: "Then, please let us know via our [LINE Official Account](http://lin.ee/57zX9DW6k) if you would like to do so, so our committees won't deny your application due to false positives for insufficient funds (i.e. you haven't paid the Delivery Fee for the other person)." - question: "Will I get refunds if I failed to reach the target?" answer: - type: "markdown" text: "**The registration fees are non-refundable and non-negotiable.** However, paid delivery fees can be refunded to you by contacting us through our [LINE Official Account](http://lin.ee/57zX9DW6k)." but wait! we're not just able to make it work in the faq section, but also most of our webpages! webpages explaining all of our events are now completely coded in yaml, our (COMPUTERUN) homepage is now also written in yaml; even our online guidebooks, sponsorship proposal, && media partner proposal are entirely written in yaml! this means that COMPUTERUN 2.0 committees wishing to update the page no longer need to understand a bunch of html; just hack that yaml && markdown source files && done! 🔥🔥🔥 the modernization of the codebase is definitely making it more flexible and quicker to set up for changes; let's say, when one of your events require an Instagram username; before, we had to modify our registration logic && add a new form to insert your Instagram username, but today we'll just need to add that additional field directly on our database, and our backend codebase will automatically recognize and start to validate that, too! interested in COMPUTERUN 2.0? if you're interested, just head over to the official website at https://computerun.id, or follow and contact us through many ways! COMPUTERUN 2.0 is proudly presented not just by us (the folks at https://reinhart1010.id), but also by HIMSISFO (Information Systems Student Association) and HIMTI (Computer Science Student Association), two of the largest official Student Associations in BINUS University! && true, this is our second (or first, 'cause arrays starts at 0, unless you're R or MATLAB) installation of COMPUTERUN, && this is our first (or 0th) installation to be held internationally!

reinhart1010.id Site Update: (Awesome) Code Previews!
Cover image for reinhart1010.id Site Update: (Awesome) Code Previews!
I'll never ask and answer on Stack Overflow again.

This blog post is supposed to be an exciting news that I have decided to return to StackOverflow after being inactive since 2014. However, after trying again to participate in the site again, I have finally decided not to join Stack Overflow again. While the site itself is still enjoyable with millions of software developers. But please mark my words: Everything in Stack Overflow is a duplicate of everything in Stack Overflow. Here's the thing. The number of users and questions over Stack Overflow seems to outpace the development of many programming languages, libraries, and frameworks. And this, at least, has been proven true for some programming languages such as C and BASIC which is way slower to have new language features compared to those in JavaScript and Python today. What does this mean? This means that the yield rate of new unique questions deriving from that programming language, framework, or library are getting slower and slower over time. And, in layman's terms, what does this really mean to the future of Stack Overflow website? Theoretically, in the future, you won't be able ask new questions since they'll be closed as duplicate no matter the things you ask. In this blog post I will also discuss how the general Stack Overflow community compares to an Indonesian-based community over Kotakode.com, a Q&A site which works similarly to the ones at Stack Overflow. While I myself have been appointed as one of the moderators of their official Telegram group, this blog post is not an endorsement of and by the Kotakode.com company (PT. Kota Digital Nusantara) as well as the broader community. Regular Expressions: A Simple Example. One day, an user on Stack Overflow asks a new question about PHP and regular expressions. The user would like to replace the following batch of text: ?DEMO - 92?JOHN AAA?DEMO - 11?JOHN BBB?DEMO - 34?JOHN CCC?DEMO - 55?JOHN DDD?DEMO - 73?JOHN EEE into this: JOHN AAAJOHN BBBJOHN CCCJOHN DDDJOHN EEE Of course, this would be easy with Regular Expressions, right? And I know that preg_replace() would be the perfect job for that. Hence I suggest the author to use preg_replace('/^\?DEMO - \d+\?/', '', $str);. The author of the question thanked my by marking my answer as the correct one. Hey, that's good! At least I get an additional 25 reputations for that. But soon I realized that this is just a dream, as a couple of minutes later someone with a gold badge of PHP closed this as a duplicate. https://stackoverflow.com/questions/69592918/parse-texts-with-php/69592967#69592967 Of course, I would be thankful to mickmackusa, Nigel Ren, and oguz ismail, three of the substantial amount of StackOverflow users out there who have emotionally influenced me to never visit StackOverflow again. At least, asking and answering questions on the site, as expected by their community guidelines: Get used to answering and editing and asking questions first, so that you have a better feel for the local culture and get to see your own work become a part of the site. (Voting and comment and deleting things are all secondary activities on Stack Overflow) Learning from Quora In Quora, all answers deriving from questions marked as duplicate will be merged instead into the referring questions, allowing other users to view different opinions and even upvote the answers. Furthermore, Quora shows the original question which the user was originally answered for, if the question has been renamed or merged with another one. Quora knows that many of their questions tend to be open-ended, so this would be the best choice to keep the community alive. And it worked well! However, Stack Overflow seems to expect that their answers are close-ended. And they thought closing duplicates this way could be better. This is also the reason why many long-time users are angry when someone asks an open-ended question, like, "Is HTML a programming language?". To quote from theirs: As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance. I personally feel that the well-educated users of Stack Overflow have created a barrier of entry for newcomers. Whether they're visiting Stack Overflow for the first time, or even just got their hands in programming for the first time. Imagine a place where you're blamed for not hearing people's past discussions on that place, and Stack Overflow could be one of them. This is a problem not just for Stack Overflow, and this could affect millions of people who visited the site. Meanwhile, at Kotakode.com, our mission is to build and empower an inclusive community of Indonesian programmers and software developers. So seriously, what would be the point of that if we always mute and kick those newbies just because they are asking questions which have been answered years and even months ago? How do we handle things differently in Kotakode.com? Now, if you're visiting Kotakode.com, you'll notice that the site is generally written in Indonesian (Bahasa Indonesia). This is because the site is dedicated towards Indonesian-speaking software developers, and the lack of a similar Q&A site for them have become one of the motivations behind building it from scratch. Even if you're familiar with the language, asking and answering questions over Kotakode feels different than the likenesses of Stack Overflow. Some questions over Kotakode are open-minded, and we even have specific question tags such as #referensi (lit. references) to mark questions which could be filled with opinions and arguments - something which is discouraged otherwise in Stack Overflow. Now, of course, Kotakode is still new, and we're just about 1 year old. However, what will happens if Kotakode face the same challenge as Stack Overflow today? There are many things which are needed to be discussed at first (e.g. duplicate policy), or we might end up splitting our sites for newbies and advanced, just like the CodeNewbie Community forum which is now separated from the larger DEV.to. At the end, again, I won't be motivated to participate in Stack Overflow again. Enough is enough.

reinhart1010.id Site Update, 20th birthday edition.

Hey, it's me again. TL;DR: We has just change our site theme (again), but it won't be too much different than the previous one. Now we use a newer shade of blue and green on to make colored text more contrast than the background pattern. As you can see above, root articles now always appear green while SYSTEM always appear blue. And the best part of it? Post date and authors can be seen on the top so you can finally see who wrote that thing, like this one: This new theme is based on Autonomie, one of the (rare) WordPress themes which is compatible with microformats2 semantic HTML markup. One major disadvantage, though, is that dark mode is now only can be enabled through system-wide settings since we're using prefers-color-scheme instead of custom JavaScript-based solution. That's all for now, back to work and scanf() some presents!

A Let's Encrypt issue broke BINUSMAYA Praktikum (bluejack.binus.ac.id)
Cover image for A Let's Encrypt issue broke BINUSMAYA Praktikum (bluejack.binus.ac.id)
Let's make a virtual expo that doesn't suck! (Part 1)
Cover image for Let's make a virtual expo that doesn't suck! (Part 1)

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

A Reinhart company

Products

Company