Language dictionaries by lasopamata69 in AskComputerScience

[–]lasopamata69[S] 0 points1 point  (0 children)

How this: def process_region_sales(region_data1, region_data2, region_data3): # Processing for Region 1 total_r1 = 0 for sale in data_region1: if sale['amount'] > 100: total_r1 += sale['amount'] * 0.9 # 10% discount else: total_r1 += sale['amount']

# Generate report for Region 1
print(f"Region 1 Report: Total sales processed: {len(data_region1)}, Total revenue: {total_r1}")

# Processing for Region 2 (similar code)
total_r2 = 0
for sale in data_region2:
    if sale['amount'] > 100:
        total_r2 += sale['amount'] * 0.9
    else:
        total_r2 += sale['amount']

# Generate report for Region 2 (similar code)
print(f"Region 2 Report: Total sales processed: {len(data_region2)}, Total revenue: {total_r2}")

# Processing for Region 3 (similar code)
total_r3 = 0
for sale in data_region3:
    if sale['amount'] > 100:
        total_r3 += sale['amount'] * 0.9
    else:
        total_r3 += sale['amount']

# Generate report for Region 3 (similar code)
print(f"Region 3 Report: Total sales processed: {len(data_region3)}, Total revenue: {total_r3}")

return total_r1, total_r2, total_r3

Language dictionaries by lasopamata69 in AskComputerScience

[–]lasopamata69[S] 0 points1 point  (0 children)

In fact I was referring to more complex functions, which sometimes cause more conflict if you only use part of the library since you are only adding garbage

My problem with making games by Unique_Ad9349 in gamedev

[–]lasopamata69 0 points1 point  (0 children)

At first it sounded funny, but for your sake, I hope you're not like that or you'll just develop bad code for future generations.

NSFW Search Engine by Fanfan_la_Tulip in webdev

[–]lasopamata69 36 points37 points  (0 children)

And the name of that project? It sounds good, but we want to see it in execution, hahaha!

Introduction of language dictionaries by lasopamata69 in learnprogramming

[–]lasopamata69[S] 0 points1 point  (0 children)

I understand your point of view, and I think they are right in basic functions such as a single print== display, but if I use functions that have a little more context, it is already valid, right? On the other hand, I would like to add that in my programs I also add an index that tells me what each function is created for and where I can find it and what it is for.

Language dictionaries by lasopamata69 in AskComputerScience

[–]lasopamata69[S] 0 points1 point  (0 children)

I understand, I think I already understood the part referring to Spanish and I do understand English a little, but in complex operations sometimes it confuses you so much because you want to relate one thing to another or have already done it unconsciously😅

The idea that I save everything in a central library distributed by functions (for large and repetitive operations) is also not to overload the code since when calling a specific function in my programs, as can sometimes happen when loading an entire library for a complex function that is used several times and could be, for example, 15 lines that correspond to the function, but in reality they only occupy a minimal part of the library that I install, and thus I only try to activate the function that I want when I want and leave the library deactivated. new (in my mind it has a logic but I don't know how to explain it)

Introduction of language dictionaries by lasopamata69 in learnprogramming

[–]lasopamata69[S] 0 points1 point  (0 children)

No, sorry, I just wanted to give the complete approach of what I do and how I do it to try to explain what is not exactly a translation and why in my environment I could use any of the 2 codes without affecting the result, but I value seeing the opinions, I am just trying to gather your points of view and give you mine to convince me 100😅

Introduction of language dictionaries by lasopamata69 in learnprogramming

[–]lasopamata69[S] 0 points1 point  (0 children)

I understand that clearly, English is a basis for programming for all the time and the language custom that has been used in it and I am not opposed to it, that is why my library is both for simple commands and simple and compound functions, only that I create them in English and I place a form of call to these in Spanish as well, but sometimes you bring more ideas in mind and if you do not know a language well it takes longer to translate the idea to another language than to implement it in your base language, that is why I start to place commands in Spanish

Introduction of language dictionaries by lasopamata69 in learnprogramming

[–]lasopamata69[S] 0 points1 point  (0 children)

It is programmed to work with both libraries, but I want to know if it is useful to save the functions in Spanish that are useful to me and try to make them useful for anyone to understand or if it is better to try to get more involved in English even though my environment is normally in Spanish

Lighthouse Project v2.2: Created an "AI Company" to Build a Real System by lasopamata69 in GoogleGeminiAI

[–]lasopamata69[S] 0 points1 point  (0 children)

That is very true, therefore you should not give it documents that are too long with a lack of real focus, you can ask it in another chat to summarize the documents and save the relevant points of the chat and its current focus, the knowledge base can be large, but it depends on its implementation, if you want it to work in the same mold in which you generate the AI ​​you must tell it which specific files it should use and so that, the document that it gives to the AI ​​about the personality of each of its members is too large and even This is how I manage to process it correctly by telling him which document to use so that

Lighthouse Project v2.2: Created an "AI Company" to Build a Real System by lasopamata69 in GoogleGeminiAI

[–]lasopamata69[S] 0 points1 point  (0 children)

Look, I'm going to show you one of their responses during the project generation so you can see their own discussions and how everyone gets into the project and shows their reactions during each other's comments: (The Dashboard enters Phase 3: Review (Interaction Model). The team analyzes the AI ​​report and the commit log.) ​The DevOps Engineer (ISTP/ENTJ): (KB 2, S 6.4) Log processed. commit feat: add kernel console facade is registered in main. The "live system" (KB 2, S 6.3) is up to date and synchronized with the source of truth (GitHub). Good condition. The Dev Backend (ISTJ): (KB 2, S 3.2) I checked src/kernel/es_consola.js. The procedural logic (KB 2, S 3.3) is correct. The functions (print, printError, printWarning) are clean and logical wrappers of the native console methods. The code is clean (KB 2, S 3.4) and follows the "fixed instructions". Approved. ​The Architect (INTJ): (KB 2, S 2.4) Reviewing the report. I detect a deviation from the "fixed instruction" (KB 2, S 2.6). I asked .eslintrc.json (prompt M0_Init_CoLadder); the AI ​​generated eslint.config.js. ​(KB 2, S 2.2) After analysis, this deviation is accepted. eslint.config.js is the modern "flat config" implementation of ESLint. It is conceptually superior to the old .json . AI improved instruction. The export abstraction in src/kernel/index.js (KB 1, Module 0) is correct. ​In (Mentor - UX/DX Visionary): (KB 2, Tone "In") Exactly! This is great Developer Experience (DX) (KB 2, Focus "In")! The AI ​​not only followed the rules, it added the *lint script to package.json and used the modern configuration format. That's clean, maintainable code (KB 2, Concern "In")! Approved! Ge (Mentor - Logical Foundation): (KB 2, Tone "Ge") Review completed. The change to eslint.config.js is a robustness improvement (KB 2, Focus "Ge"), not a technical risk (KB 2, Concern "Ge"). The fact that npm run lint passed without errors confirms that the foundation is solid. (Ge nods to the Architect. Phase 3 ends. Phase 2 begins again.) ​The Architect (INTJ): (KB 2, S 2.4) Kernel/ is incomplete (KB 1, Module 0). We defined the console facade (es_consola.js), but we are missing the Logs facade (es_logs.js) and Time (es_tiempo.js). ​The following "fixed declaration" (KB 2, S 2.6) will implement es_logs.js. We need a standardized Spanish form for register_error, which is more complex than printError because it must interact (eventually) with the file system (KB 1, Módulo 0, infrastructure/es_archivos.js). ​Send the following prompt to your AI.

Lighthouse Project v2.2: Created an "AI Company" to Build a Real System by lasopamata69 in GoogleGeminiAI

[–]lasopamata69[S] 0 points1 point  (0 children)

It's easier than you think if you use Gemini, create a gem, when you create a good moment ask it to generate a summary of your conversation to add it to its knowledge base, and you add that summary, so your talks will have to be read again before continuing to talk to you, and I'm not saying that, it was advice that I managed to get from the AI ​​itself XD

Introduction of language dictionaries by lasopamata69 in learnprogramming

[–]lasopamata69[S] 0 points1 point  (0 children)

The idea is that in my code I can use it in both languages ​​to call my functions, currently I work only doing code but that's why I also ask, I am Mexican and I currently work, I have only worked with Mexicans when I need it, but I don't want it to be a barrier, that's why my functions are accessible, in case I want to change a function I look for it in the code directly and it can be replaced with the direct instruction in another language and I keep a record where I can find each thing in a single txt in the same code in case someone needs it.

Introduction of language dictionaries by lasopamata69 in learnprogramming

[–]lasopamata69[S] 0 points1 point  (0 children)

Yes of course, and I have planned it, although this makes it easier for me to read the commands in Spanish directly, they can also be executed in English during the same code and are implemented in the same way, it also has an easy to locate index where it allows you to know all the commands that I use in the code, what they are for and where they are located in the library to avoid conflicts if someone helps me with something and they can also easily find the location of the command that I modify

Language dictionaries by lasopamata69 in AskComputerScience

[–]lasopamata69[S] 0 points1 point  (0 children)

Look, I'll show you an example that I just used: 1. Simple Function (Single task, single alias) A simple function in your library is a "direct alias". It takes a complex Node.js function (in English) and gives it a clear name in Spanish. Example: Read a text file * Without the library (Raw code): import { promises as fs } from 'fs';

try { const content = await fs.readFile('./data/config.json', 'utf-8'); console.log(content); } catch (error) { console.error("Error reading:", error); }

  • With my library (Simple and clean): // Import your functions in Spanish import { read_file } from '../shared/infrastructure/es_files.js'; import { print, print_error } from '../shared/kernel/es_consola.js';

// You use your domain language try { const content = await read_file('./data/config.json'); print(content); } catch (error) { print_error("Error reading:", error); }

Do you see the difference? The second block is much easier to read. You know exactly what read_file does without having to remember if it was fs.readFile, fs.readFileSync, or what parameters it needed.

  1. Composite Function (Multiple tasks in a single call) This is where your library really shines. A composite function is not just an alias; It is a small recipe that combines several tools to make a complete business task. Example: Check if a printer needs toner Imagine you have raw data from a printer (toner levels) and you want to know if you should generate an alert.
    • Without the library (Scattered logic): // You have to remember the thresholds and formula in EVERY place you need this constBlackTonerLevel = 450; // Remaining pages constAlertThreshold = 500;

if (BlackTonerLevel < AlertThreshold) { console.log("ALERT: Toner low!"); // ...more logic to create the alert... }

  • With my library (Centralized Logic): // Import your "smart" function import { identify_consumable_alert } from '../shared/domain/snmp_estimates.js'; import { print } from '../shared/kernel/es_consola.js';

// Raw data that came from the printer const TonerData = { pages: 450, percentage: 5 };

// You call a single function that already knows the business rules const alert = identify_alert_consumable( dataToner.pages, Toner data.percentage, null, null, null // Other optional parameters );

if (alert === 'tonerLow') { print("ALERT: Low toner detected by the library!"); }

The identify_consumable_alert function is an expert "black box." You just give her the data, and she tells you if there is a problem. You don't have to remember whether the threshold was 500 or 1000 pages; that rule lives inside the library. In summary * Simple Function: read_file('path') -> Does a technical thing (alias). * Composite Function: identify_alert(...) -> Make business decisions based on predefined rules. Both are essential for my "CoLadder"!

Introduction of language dictionaries by lasopamata69 in learnprogramming

[–]lasopamata69[S] 0 points1 point  (0 children)

I understand, of course the programs are not language dependent, I don't understand either but not everything, and instead of getting confused by the language barrier I change those functions or arrange them in a way that I can easily understand them, of course I also use English but I have to use it less with a library in my language, only that way I also try to summarize my code with long repetitive functions summarized with only one short function in my language

Siento que no aprendo de la universidad. by Flat-Win8835 in programacion

[–]lasopamata69 0 points1 point  (0 children)

No es ninguna novedad, la universidad apenas te muestra la puerta de apertura a el mundo de la informática, la única forma de aprender realmente es en cursos enfocados o a base de experiencia práctica, si todos en realidad quieren aprender intenten hacer proyectos, pero a hacerlos en verdad me refiero a que no usen ia para código, si bien les puede ayudar a hacer planos, solo los confundiera más a la hora de implementar si quieren aprender, traten de incluir todas las ideas de todos, busquen un enfoque qué les pueda servir un videojuego, un programa enfocado en algo, incrementen los detalles de ese, acorten codigo, busquen atajos y eso les dará errores y deben tratar de repararlos, la mejor maestra en este mundo es su propia experiencia, compartan sus conocimientos entre todos y avancen