Prerna Tiwari

Prerna Tiwari

20 Articles Published

Articles by Prerna Tiwari

20 articles

Software Engineering for Data Scientists in Python

Prerna Tiwari
Prerna Tiwari
Updated on 26-Mar-2026 389 Views

Data science integrates mathematics, statistics, specialized programming, advanced analytics, machine learning, and artificial intelligence to reveal actionable insights from organizational data. As data volume continues to grow exponentially across industries, software engineering principles have become crucial for data scientists working in production environments. While data scientists excel at statistical modeling and analysis, many lack fundamental programming skills needed for production−ready code. This article explores why software engineering matters for data scientists and covers essential principles including clean code, modularity, refactoring, testing, and code reviews. Why Software Engineering Matters for Data Scientists Data scientists often face criticism from ...

Read More

Python for MATLAB Users

Prerna Tiwari
Prerna Tiwari
Updated on 26-Mar-2026 785 Views

When transitioning from academia to industry, especially in engineering fields, professionals often encounter a shift from legacy tools like MATLAB to modern alternatives like Python. This transition is driven by Python's cost-effectiveness, better memory management, extensive open-source ecosystem, and cleaner syntax. The good news for MATLAB users is that Python's syntax, particularly with NumPy, shares many similarities with MATLAB, making the transition smoother than expected. NumPy Features for MATLAB Users NumPy provides several features that ease the transition from MATLAB to Python: The numpy.matlib module includes matrix versions of common constructors like zeros(), ones(), empty(), ...

Read More

Generate PDF in ElectronJS

Prerna Tiwari
Prerna Tiwari
Updated on 15-Mar-2026 2K+ Views

Electron is a popular framework for building cross-platform desktop applications using JavaScript, HTML, and CSS. One common requirement in desktop applications is the ability to generate PDF documents programmatically. In this article, we will explore how to generate PDF files in Electron using the jsPDF library. We will cover the basics of PDF generation, installation steps, and various customization options to create professional-looking documents. PDF (Portable Document Format) is a file format developed by Adobe Systems that preserves document formatting across different platforms and devices. PDF files can contain text, images, tables, and other elements while maintaining consistent ...

Read More

How to convert angular 4 application to desktop application using electron?

Prerna Tiwari
Prerna Tiwari
Updated on 15-Mar-2026 2K+ Views

Utilizing web technologies like JavaScript, HTML, and CSS, you can create cross-platform desktop applications using the popular framework Electron. This article will guide you through converting an Angular 4 application into a desktop application using Electron. Prerequisites Before starting, ensure you have: Node.js installed on your system An existing Angular 4 application (built and ready) Basic knowledge of Angular and Node.js Setting Up Electron Follow these steps to set up Electron for your Angular application: Step 1: Install Electron Navigate to your Angular project directory ...

Read More

How to create a JavaScript callback for knowing if an image is loaded?

Prerna Tiwari
Prerna Tiwari
Updated on 15-Mar-2026 3K+ Views

JavaScript provides several methods to detect when an image has finished loading on a web page. This is crucial for ensuring images are fully available before accessing their properties or performing operations on them. What is a callback function? A callback function is a function passed as an argument to another function and executed after the main function completes. In JavaScript, callbacks enable asynchronous programming and help create more dynamic web applications. Why use a callback for image loading? When a browser encounters an image element in HTML, it begins loading the image asynchronously. The image ...

Read More

How to create a new object from the specified object, where all the keys are in lowercase in JavaScript?

Prerna Tiwari
Prerna Tiwari
Updated on 15-Mar-2026 3K+ Views

There are many methods for creating new objects from older ones in JavaScript. Creating a new object with the same keys as an existing object but with all the keys in lowercase is a common use case. When working with data from many sources that have irregular key casing, this can be helpful. We'll look at various JavaScript ways to create new objects with lowercase keys in this blog post. However, before doing so, it's important to remember that while creating a new object with lowercase keys might be helpful when working with data from various sources, it's also ...

Read More

Javascript Program to Count 1's in a sorted binary array

Prerna Tiwari
Prerna Tiwari
Updated on 15-Mar-2026 515 Views

We have two approaches to count 1's in a sorted binary array. The first one is to iterate through the array and count the 1's. The second approach is to use a binary search algorithm to find the first occurrence of 1 in the array. It is important to note that in order to use these approaches, the array must be sorted. In this article, we will discuss a JavaScript program to count the number of 1's in a sorted binary array. We will also look at some edge cases and optimization techniques to make the program more ...

Read More

Form required attribute with a custom validation message in HTML5

Prerna Tiwari
Prerna Tiwari
Updated on 15-Mar-2026 20K+ Views

HTML5 includes a number of built-in form validation features that allow developers to easily add validation to their forms. One of these features is the "required" attribute, which specifies that an input field is required and must be filled out before the form can be submitted. The "required" attribute is a boolean attribute. If any input field with the "required" attribute is present in the form, then this field must be completed before submitting the form. If that particular field is left blank before submitting the form, the user will see an error message from the browser informing ...

Read More

How to convert a number into an array in JavaScript?

Prerna Tiwari
Prerna Tiwari
Updated on 15-Mar-2026 7K+ Views

In JavaScript, there are several methods to convert a number into an array of its individual digits. This conversion is useful for tasks like splitting phone numbers, parsing dates, or performing mathematical operations on individual digits. Method 1: Using split() Method The split() method is the simplest approach. It converts the number to a string and then splits it into individual characters. Example let number = 12345; let numberArray = number.toString().split(""); ...

Read More

How to convert a pixel value to a number value using JavaScript?

Prerna Tiwari
Prerna Tiwari
Updated on 15-Mar-2026 5K+ Views

Converting pixel values to number values in JavaScript is a common task in web development when working with CSS properties, element positioning, or calculations. Pixel values like "100px" need to be converted to numeric values like 100 for mathematical operations. When positioning and styling items on a web page, you often need to work with both pixel and numeric values. For instance, you might need to convert a pixel value such as "100px" to a number value like 100 to perform calculations or operations. This article explores different methods to convert pixel values to numbers using JavaScript. Method ...

Read More
Showing 1–10 of 20 articles
« Prev 1 2 Next »
Advertisements