Programming

46 readers
2 users here now

This magazine is dedicated to discussions on programming languages, software development, and coding. Whether you are a beginner programmer or an experienced developer, this is the place for you. Here you can share your knowledge, ask questions, and engage in discussions on topics such as coding languages, software engineering, web development, and more. From the latest trends and frameworks to tips and tricks for debugging, this category covers a wide range of topics related to programming.

founded 1 year ago
1
 
 

This is the SECOND time in 3 days that I forgot that if statements in lisp are ternary. Someone needs to end me.

#programming

2
 
 

Anyone got any good alternatives to #stackoverflow?

#programming

3
 
 

Have you ever mocked your logger in a test, or wished you could? That is something like

TEST(some test name)

    mockLogger logger

    logger.expect_call(log("some string"))

    DoSomething(logger)

#programming

4
 
 

I feel like I am between a rock and a hard place and I would like some perspective and/or advice from other developers or programmers to help decide what my next course of action should be.

I got into software dev around the beginning of the pandemic when my institution hired a new supervisor for a new team called the Application Team (subset of ITS) specifically for creating customer business applications on campus for different business needs. It started as taking over support for customer Microsoft Access Applications that were initially suported by a contractor for over 15 years.

After getting to the start of the 2nd year, we had trouble keeping other developers on because the pay isn't high enough to keep a new developer on longer than a couple months. Needless to say, this opened up an opportunity for me to start learning C# and .NET and gave me an ability to get promoted with new responsibilities. It was always understood that I will be learning on the job.

That being said, fast forward to the last year or so, I am the most senior developer (under my supervisor - who has 40+ years of experience) and we were able to promote non-IT people to beginner developer positions - with the idea my supervisor will help train them in how to do software development and the full software dev life cycle etc.

Now, to where I am struggling. My supervisor is holding 2 weekly meetings, at 3 hours a piece, where he goes through the development of a real product we need to implement for our institution. I was asked to join these meetings because I could add some additional value but also because since I am still relatively new to development work, we thought it might be good to reinforce some of the stuff I've learned on top of learning new concepts we are building out for the first time(like apply business rules with a MVC type of paradigm).

The main problem is I am struggling with these meetings because they are so basic and I find it hard to pay attention and stay focused and engaged through our meetings. Some of the stuff I just can't learn by watching 3 hours of demonstration, it's not a good a way of learning for me. I personally need to see a demonstration, then I need to apply it to my own situation and "play" with it to make sure I fully understand. Simply watching someone do all the work and talk through the process isn't effective for me to learn - at least to a point. Especially if we don't have "work" to do that helps reinforce what we are learning in the sessions. I feel like the new developers are getting more out of these sessions than I am because I just don't find them all that helpful, even though I do see nuggets of good information from time to time.

Does this sound like a situation where I just need to "man up" and accept I am going to have to go through this 6 hours every week, even though the benefits feel marginal at best and a waste of time at its worse. The last training sessions and this one has been watching him debug a business rule for almost 3 hours between 2 days and I just don't feel like this is helpful or I am learning because I can' stand to pay attention for longer than 15 minutes. It's making me wonder if I made a mistake switching to software dev a little bit. Maybe I need an attitude adjustment. Maybe I need to speak to my supervisor about the training, but I feel he's more focused on our new developers right now. I do agree that some of this is very important and I need to be involved with some of the training due to the decisions we make as a team but I feel like this time could be better put towards self taught training.

Thank you to anyone who takes the time to read and reply. I really appreciate it.

5
 
 

The value of a clean git history is often underestimated. I will explain one of the advantages based on the git bisect command.

6
 
 

Mocking libraries come with disadvantages, but fortunately they can be replaced by in-memory implementations, at least for repositories.

7
1
submitted 9 months ago* (last edited 9 months ago) by [email protected] to c/[email protected]
 
 

Lets learn a bit about array with javascript.

An Array is an Object that stores values in order. In the example above we used an Object to store our car because it had specific properties that we wanted to be able to access easily via a key. If we just want to store a list of items, then there is no need to create an Object. Instead, we can use an Array. https://www.chat-to.dev/post?id=14 #javascript #programming

8
 
 

GitHub uses MySQL to store vast amounts of relational data. This is the story of how we seamlessly upgraded our production fleet to MySQL 8.0.

9
 
 

Callbacks

We can achieve asynchronous programming in JavaScript if we use the callbacks. A callback is a function that is passed as an argument to another function. The idea of the callback function is ‘I will call you back later’. You should know that the functions in JavaScript are executed in the sequence they are called, not in the sequence they are defined in. Okay, without confusing you, I will start from the beginning, why sequence control is so important in JavaScript. The sequence of control allows us to control the sequence when a function needs to be executed. For example, let us say that we want to create a function that will do some basic arithmetic operation like the sum of two integer numbers. After the function returns the result, we want to call another function to display the result to the user. So now we have two functions, one mainly for calculation, and the other is to display the user the result. Therefore we know their sequence of execution. Of course, you cannot start showing the results without first calling the calculation function. Here is the entire example: https://www.chat-to.dev/post?id=13

#programming

10
 
 

Today, we'll review the source code for RE3– the reverse-engineered C++ source code for Grand Theft Auto III and Vice City.

11
 
 

I'm having a lot of trouble with the lack of documentation (I had to dig and poke around for days to get it working not from the files directly, only for it to stop working again in the same way, all while still having the fix for it), and the lack of an incentive from some of its other users in the D community to make anything newer than 5.1 working (I NEED INTEGER SUPPORT).

Basically I need a relatively lightweight scripting library for my game engine written in D, that isn't a toy language (which doesn't have integer support). Most other scripting libraries lack integer support (even Lua did until 5.4, because yOU CaN JuST uSE rOUnDIng ON youR BaCKeNd) and/or are heavily bloated (I don't want to include 50+MB stuff just because it's trendy to make your scripting language a slow and clunky application language (I'm looking at you, Javascript!)). I'm using D, but it can interface with both C and C++.

I would be fine with Lua, and if I had the time, I'd just reimplement it in D without the godawful and confusing stack method of interaction. But now I have to look for some feasible alternatives.

12
 
 

use any fonts you like on your web pages thanks to this recipe.

Although web browsers come with a reasonable range of default fonts, they don’t always provide the look you need for a particular web site. In such cases, you usually must resort to calling up a graphic editor and creating logos or headlines there. However, with this recipe all you have to do is upload the TrueType fonts you wish to use to your web site and you can then display text in these fonts by having the GD library convert it on the fly to GIF images.
https://chat-to.dev/post?id=9 #php #backend #programming

13
 
 

When accepting user input for redisplay, and particularly if it will be inserted into a database, it’s important that you sanitize the input to remove any malicious attempts at hijacking your server, or otherwise injecting unwanted MySQL commands, HTML, or JavaScript. https://chat-to.dev/post?id=6

#programming

14
 
 

Join chat rooms and explore programming content on Chat-to.dev.

15
 
 

The 14 Day Filmmaker Smartphone Edition is an online course about making films using a smartphone.

16
 
 

Understand the mechanics of dynamic dispatch implementation in CPython

17
 
 

If you're looking to transform your living space into a cozy and inviting haven, look no further than the L-shaped sofa. This versatile furniture piece has been taking the design world by storm, revolutionizing how we arrange our seating areas. With its sleek lines and spacious layout, an L-shaped sofa is not only practical but also adds an element of contemporary sophistication to any room. So get ready to maximize both comfort and style as we delve into why L-shaped sofas are the ultimate choice for today's interior enthusiasts!

The Rise of L-Shaped Sofas in Modern Interior Design

Gone are the days when sofas were limited to traditional shapes and sizes. Modern interior design has embraced innovation, and L shape sofa have emerged as a hot trend in recent years. The rise of L-shaped sofas can be attributed to their ability to effortlessly blend functionality with style.

One of the key reasons behind their popularity is the versatility they offer in arrangement. Whether you have a compact living room or an open-concept space, an L-shaped sofa can easily fit into any corner, maximizing your floor space while providing ample seating for family and guests.

Moreover, L-shaped sofas have evolved beyond being just a seating option; they now serve as multifunctional pieces that cater to various needs. You can find models with built-in storage compartments or even ones that transform into cozy beds for overnight guests.

Another factor driving the popularity of these sofas is their aesthetic appeal. With clean lines, sleek designs, and a wide range of upholstery options available, L-shaped sofas effortlessly elevate the visual appeal of any room. From luxurious leather finishes to soft fabric textures, there's something for every taste and style preference.

Furthermore, L-shaped sofas bring an element of contemporary sophistication to any space they grace. Their bold presence adds character without overwhelming other furniture pieces or decor items in your room.

Versatility in Arrangement and Functionality

L-shaped sofas have gained immense popularity in modern interior design, and one of the reasons for their widespread appeal is their versatility in arrangement and functionality. These sofas offer a range of possibilities when it comes to configuring your seating area, allowing you to make the most out of your available space.

One of the key advantages of L-shaped sofas is their ability to fit snugly into corners, making them an ideal choice for smaller living rooms or apartments. By utilizing this corner space effectively, you can create a cozy and inviting seating area without sacrificing valuable square footage.

Furthermore, the unique shape of these sofas allows for various seating arrangements. You can place them against a wall or use them as room dividers to separate different areas within an open-concept living space. This flexibility enables you to transform your sofa from a traditional sitting area into a more social and interactive setting when hosting gatherings or entertaining guests.

In terms of functionality, L-shaped sofas often come with additional features such as built-in storage compartments or pull-out beds. These clever additions provide practical solutions for storing extra pillows, blankets, or even converting your sofa into a comfortable sleeping option for overnight guests.

The versatility in arrangement and functionality offered by L-shaped sofas makes them an excellent investment for any home. Whether you have limited space or simply want to add some style and convenience to your living room, these trendy pieces are sure to maximize comfort while adding flair to your decor scheme!

Tips for Choosing the Right L-Shaped Sofa for Your Space

When it comes to choosing the right L-shaped sofa for your space, there are a few key factors to consider. First and foremost, you'll want to take measurements of your room to ensure that the sofa will fit properly. There's nothing worse than falling in love with a sofa only to realize it won't fit through the door!

Next, think about the style and color of the sofa. L-shaped sofas come in a variety of designs, from sleek and modern to more traditional and cozy. Consider the overall aesthetic of your space and choose a sofa that complements it.

Comfort is also crucial when selecting an L-shaped sofa. Look for one with supportive cushions and plenty of seating space. You'll want something that can accommodate both family movie nights and entertaining guests.

Don't forget about durability either! Since an L-shaped sofa typically takes up a significant amount of space, you'll want to invest in one that will stand the test of time. Look for high-quality materials such as hardwood frames or sturdy metal construction.

Don't be afraid to try before you buy! Visit furniture stores or showrooms where you can see and test out different options firsthand. This way, you can get a feel for how comfortable each option is and whether it suits your needs.

By considering these tips when choosing an L-shaped sofa for your space, you can ensure both comfort and style in your living area!

Combining Comfort and Style: How to Accessorize Your L-Shaped Sofa

Accessorizing your L shape sofa dubai is the final touch that will bring your entire living space together in perfect harmony. By combining comfort and style, you can create a cozy and inviting atmosphere that reflects your personal taste.

Start by selecting throw pillows and blankets that complement the color scheme and design of your sofa. Opt for soft fabrics like velvet or faux fur to add an extra layer of comfort. Experiment with different sizes, shapes, and textures to create visual interest.

Next, consider adding a stylish coffee table or side tables near your L-shaped sofa. These pieces not only provide a convenient surface for beverages or snacks but also serve as decorative elements. Choose tables with unique designs or interesting materials to make a statement in your living room.

Lighting is another crucial aspect when accessorizing your L-shaped sofa. Install warm ambient lighting fixtures such as floor lamps or wall sconces to create an inviting ambiance. You can also incorporate task lighting with adjustable desk lamps for reading nooks within the seating area.

To complete the look, don't forget about artwork and decorative accents on the walls surrounding your L-shaped sofa. Hang paintings, photographs, or mirrors that resonate with your personal style to enhance the overall aesthetic appeal of the space.

Consider introducing plants into your living room decor scheme. Not only do they add freshness and natural beauty but they also purify the air inside your home. Select low-maintenance indoor plants like succulents or snake plants if you're not blessed with a green thumb.

By carefully selecting accessories that blend comfort and style seamlessly into one cohesive unit, you'll be able to maximize both functionality and visual appeal in relation to your L-shaped sofa setup.

So go ahead - get creative! Let these tips inspire you in transforming your living space into an oasis of comfort where style reigns supreme.

18
 
 

Hey there everyone, I am back with v1.1 of my Latex Template for making D&D Item Cards. I received one major point of feedback from multiple people in the fediverse: make an option for fixing the card dimensions for easier printing and distribution/storage at the table. So that is exactly what I did!

Now you can choose the (admitedly more user-friendly) option of letting the card length vary for digital distribution, or you can fix the card aspect ratio. The item art background and text backgrounds can also now be changed, and a number of options have been included for item art backgrounds, but you can use whatever images you want.

Example Cards

The fixed-size cards are 5:7 by default, the same as playing cards. They include a front and back side for longer item descriptions, but you will have to edit the text more carefully and decide where to split between front/back content.

For the printable card item art, I highly recommend using a PNG with a transparent background and modifying tcolorbox interior style to set your background. Ensure your backgound art is close to 7:5 for best results. You can also load your image as the background art if you'd like instead, again, making sure it is in 7:5.

19
20
 
 

Response from Martin Woodward, GitHub's VP of Developer Relations:

Sorry for the inconvenience @koepnick - while searching across all repos has required being logged in for a long time, when we enhanced the search capabilities earlier in the 2023 we had to extend this to repos as well (see https://github.blog/changelog/2023-06-07-code-search-now-requires-login/).

This is primarily to ensure we can support the load for developers on GitHub and help protect the servers from being overwhelmed by anonymous requests from bots etc.

21
 
 

Understand how objects are implemented in CPython and how CPython emulates Inheritance and Polymorphism in C using struct embedding

22
 
 

Hey there programmers, I know this is a more markup/typesetting deal, but I thought there might be people who are interested. After being dissapointed with many of the options out there for making ttrpg item cards, I made a LaTeX template for that exact purpose. I wanted it to be relatively easy to use, generate clean images, and be (semi) form fillable. The cards scale in height with the quantity of text given and image size, so users don't need to finagle with the box dimensions too much, and all card sections (generated by custom commands) can either be commented out or toggled off if they aren't relevant to the item.

If there are any people familiar with TeX who have thoughts or constructive criticism, I would love to get some more eyes on this. I have already posted this in the relavant ttrpg areas, but I am hoping people here might have more technical critiques. I have already gotten feedback that a setting for fixed dimensions would be smart in case players want to get card sleeves or a card binder, and want to make a back side for longer item descriptions, which I will work into V2.

Here is an example of a completed card with all the trimmings: Staff of the Jackal Lord

Thanks to anyone who takes the time to check it out, and if anyone uses it, please let me know what you think!

23
 
 

Devi monitors keywords in Facebook groups, LinkedIn, Twitter, and Reddit, and outreach using ChatGPT or Bard to close deal. Devi also create and schedule content using AI on all social media profiles. With Devi, you can spend less time on social media and more time growing your business.

24
 
 

Comments in code are quite often a code smell. Let’s see what is suboptimal about comments and talk about some strategies to avoid them.

25
view more: next ›